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 4 years, 8 months ago by  Deepak.
    • This discussion was modified 4 years, 8 months ago by  Forcetalks.
    • This discussion was modified 4 years, 8 months ago by  Forcetalks.
    Piyush replied 4 years, 8 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

Pros & Cons of Lightning Component vs. 3rd party frameworks in Salesforce UI development

Video in

Nikita drops by to share his invaluable experience of using popular 3rd party frameworks in Salesforce. http://media.blubrry.com/salesforceway/audio.xmcdn.com/group42/M05/25/57/wKgJ81rXk6XjaZIAAU_I_KtprFM998.m4a