Activity Forums Salesforce® Discussions Getting a ‘syntax error’ error message when attempting to use this formula in Salesforce?

  • Getting a ‘syntax error’ error message when attempting to use this formula in Salesforce?

    Posted by Deepak on August 20, 2019 at 12:25 pm

    I am getting a 'syntax error' error message when attempting to use this formula as part of a workflow rule criteria. I have double-checked the field names are all correct. Can you tell me where I might going wrong?

    AND (
    NOT(ISPICKVAL(Payment_Detail__c, "Card")),
    Days_Send__c = false,
    ISPICKVAL(StageName, "Closed Won"),
    NOT(Sector__c, "Customer 2"),
    NOT(Product__c, "Customer 2"),
    Account.Locale = "UK",
    NOT((OR(RecordType.Name != "Customer",RecordType.Name != "Customer 2"),
    NOT(Prime_Account__c != "TotalCo")
    )

    • This discussion was modified 3 years, 5 months ago by  Deepak.
    • This discussion was modified 3 years, 5 months ago by  Forcetalks.
    • This discussion was modified 3 years, 5 months ago by  Forcetalks.
    Piyush replied 3 years, 5 months ago 2 Members · 1 Reply
  • 1 Reply
  • Piyush

    Member
    August 21, 2019 at 3:47 am

    Hi Deepak,

    Looks like you're just missing some closing parenthesis on your second to last line

    NOT((OR(RecordType.Name != "Customer",RecordType.Name != "Customer 2"),

    should be

    NOT((OR(RecordType.Name != "Customer",RecordType.Name != "Customer 2"))),

    to be syntactically correct.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos