0

I'm used to building process builders with conditions but this new Org that I'm in uses formulas.

I'm trying to make this criteria formula work:

       AND([Launch__c].RecordType.Name=Blue) 

Launch = Custom Object. Record Type name = "Blue". // need to check record type

name

So I dont want the action to activate unless the record type is "Blue".

Thanks

4
  • what is your issue, is that formula working or not?
    – sdandamud1
    Feb 20 '20 at 15:50
  • Is this correct? AND([Launch__c].RecordType.Name=Blue) Or is it something like: AND([Launch__c].RecordType.Name='Blue')
    – Steve
    Feb 20 '20 at 15:51
  • you should use like `[Launch__c].RecordType.Name="Blue"
    – sdandamud1
    Feb 20 '20 at 15:52
  • I'm getting this Error: " The formula expression is invalid: Syntax error. Extra AND" ISCHANGED([Launch__c].Stage__c) AND[Launch__c].RecordType.Name='Blue'
    – Steve
    Feb 20 '20 at 15:57
0

you added AND operator for one check only , AND operates must use at least 2 conditions, in your scenario 1) is Stage__c change check and 2nd record type name check. try this one

AND (
   ISCHANGED([Launch__c].Stage__c),
   [Launch__c].RecordType.Name='Blue'
) 
4
  • That worked. Thank you sir, I appreciate your knowledge and patience.
    – Steve
    Feb 20 '20 at 16:03
  • YW, i would recommend go through help.salesforce.com/… when you get a chance.
    – sdandamud1
    Feb 20 '20 at 16:04
  • I also understand how "AND" works at the beginning now. Instead of between, by stating "AND" at the start, you're specifying that for everything after that to be AND. So this is awesome. TY
    – Steve
    Feb 20 '20 at 16:05
  • Thank you, I bookmarked that.
    – Steve
    Feb 20 '20 at 16:05
0

I believe in your case, the correct syntax would be

[Launch__c].RecordType.Name = 'Blue'

The string that is being comparing it to needs to be enclosed in 'quotes' so the compiler knows that it is a string.

I suggest you use do this Trail about formula fields

The Formula Operators and Functions is useful as it gives a complete overview with examples (such as how to use the AND() formula.)

:)

3
  • I'm getting this Error: " The formula expression is invalid: Syntax error. Extra AND" ISCHANGED([Launch__c].Stage__c) AND[Launch__c].RecordType.Name='Blue'
    – Steve
    Feb 20 '20 at 15:57
  • To use the AND() formula properly you need to add your conditions seperated by a comma. You need write: AND( ISCHANGED([Launch__c].Stage__c), [Launch__c].RecordType.Name = 'Blue' )
    – Z33dawg
    Feb 20 '20 at 16:01
  • Thank you, I appreciate your knowledge and patience.
    – Steve
    Feb 20 '20 at 16:03

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.