1

In trying to create a workflow rule to run when an Opportunity is closed won if one field is not blank and the record type is a certain Opportunity type, I am getting stuck on the last portion of the formula. I can successfully write the rule for closed won and the field value not being blank:

AND
(
  (ISPICKVAL(StageName,"Closed Won")),
  (NOT(ISBLANK(CUSTOM_FIELD__c)))
)

But when I try to apply this only to certain opportunity types and use the RecordTypeId, the rule doesn't fire.

AND
(
  (ISPICKVAL(StageName , "Closed Won")) ,
  (NOT( ISBLANK( CUSTOM_FIELD__c ))),

  OR
  (
    RecordTypeId="01290000000OCMSAA4",
    RecordTypeId="01290000000OeQgAAK", 
    RecordTypeId="01290000000OmKlAAK", 
    RecordTypeId="01290000000Oa2bAAC"
  )    
)

Am I missing something obvious or going about this the wrong way?

1
  • 1
    Try using RecordType.DeveloperName and don't hard code ID's. It is not best practice Mar 11 '14 at 3:41
1

Try this:

AND
(
  (ISPICKVAL(StageName , "Closed Won")) ,
  (NOT( ISBLANK( CUSTOM_FIELD__c ))),
  OR(
     RecordType.DeveloperName = 'NAME_OF_RECORD_TYPE_1',
     RecordType.DeveloperName = 'NAME_OF_RECORD_TYPE_2'
    )
)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.