0

I'm trying to create a formula field on opportunity that returns the value 'engaged' if the opportunity owner = SDR or AE and the opportunity CreatedDate was less than 4 months ago, but if the CreatedDate is less than 4 months, the field returns 'engaging'.

I've tried this, but the date doesn't seem to be calculating correctly.

IF( AND( OR( CONTAINS(TEXT(Owner.User_Type__c) ,“Account Executive”), CONTAINS(TEXT(Owner.User_Type__c) ,“SDR”)), DATEVALUE(CreatedDate) >= (Today() - 120)), “Ramping”,“Ramped”)

1 Answer 1

0

Why use contains when we can be explicit Especially if User Type is a picklist, which is should be. Try this, I didn't test it out with the dates but the rest of it should work and at least get you in the right direction.

IF(
  NOW() >= ADDMONTHS(CreatedDate, -4) &&
  (
   ISPICKVAL(Owner.User_Type__c, 'Account Executive') ||
   ISPICKVAL(Owner.User_Type__c, 'SDR')
  ),
 'Engaged',
IF(
 NOW() <= ADDMONTHS(CreatedDate, -4),
 'Engaging',
 'ERROR'
 )
)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .