Validation Rule Assist: Lock down multiple lead fields after they are first populated












2














I am trying to create a validation rule to lock down our original utm fields on leads after they are first populated.



Essentially I would like to prevent everyone (including our marketo sync user) but a 'system admin' to be able to update the fields below.



I think I have the Rule down for the most part, but I keep getting a syntax error "Missing ')'", please see below. Any help would be appreciated.



AND(
$Profile.Name <> "System Administrator",
ISCHANGED( OG_Lead_Source__c ),
NOT(ISBLANK(PRIORVALUE( OG_Lead_Source__c )))
ISCHANGED( OG_Lead_Medium__c ),
NOT(ISBLANK(PRIORVALUE( OG_Lead_Medium__c )))
ISCHANGED( OG_Lead_Campaign__c ),
NOT(ISBLANK(PRIORVALUE( OG_Lead_Campaign__c )))
ISCHANGED( OG_Lead_Content__c ),
NOT(ISBLANK(PRIORVALUE( OG_Lead_Content__c )))
ISCHANGED( OG_Lead_Term__c ),
NOT(ISBLANK(PRIORVALUE( OG_Lead_Term__c )))
)









share|improve this question
























  • Note: I'd advise that you use five separate validation rules instead of just one rule. This will provide a better user experience, since you will then be able to attach the error to the correct field.
    – sfdcfox
    2 days ago
















2














I am trying to create a validation rule to lock down our original utm fields on leads after they are first populated.



Essentially I would like to prevent everyone (including our marketo sync user) but a 'system admin' to be able to update the fields below.



I think I have the Rule down for the most part, but I keep getting a syntax error "Missing ')'", please see below. Any help would be appreciated.



AND(
$Profile.Name <> "System Administrator",
ISCHANGED( OG_Lead_Source__c ),
NOT(ISBLANK(PRIORVALUE( OG_Lead_Source__c )))
ISCHANGED( OG_Lead_Medium__c ),
NOT(ISBLANK(PRIORVALUE( OG_Lead_Medium__c )))
ISCHANGED( OG_Lead_Campaign__c ),
NOT(ISBLANK(PRIORVALUE( OG_Lead_Campaign__c )))
ISCHANGED( OG_Lead_Content__c ),
NOT(ISBLANK(PRIORVALUE( OG_Lead_Content__c )))
ISCHANGED( OG_Lead_Term__c ),
NOT(ISBLANK(PRIORVALUE( OG_Lead_Term__c )))
)









share|improve this question
























  • Note: I'd advise that you use five separate validation rules instead of just one rule. This will provide a better user experience, since you will then be able to attach the error to the correct field.
    – sfdcfox
    2 days ago














2












2








2







I am trying to create a validation rule to lock down our original utm fields on leads after they are first populated.



Essentially I would like to prevent everyone (including our marketo sync user) but a 'system admin' to be able to update the fields below.



I think I have the Rule down for the most part, but I keep getting a syntax error "Missing ')'", please see below. Any help would be appreciated.



AND(
$Profile.Name <> "System Administrator",
ISCHANGED( OG_Lead_Source__c ),
NOT(ISBLANK(PRIORVALUE( OG_Lead_Source__c )))
ISCHANGED( OG_Lead_Medium__c ),
NOT(ISBLANK(PRIORVALUE( OG_Lead_Medium__c )))
ISCHANGED( OG_Lead_Campaign__c ),
NOT(ISBLANK(PRIORVALUE( OG_Lead_Campaign__c )))
ISCHANGED( OG_Lead_Content__c ),
NOT(ISBLANK(PRIORVALUE( OG_Lead_Content__c )))
ISCHANGED( OG_Lead_Term__c ),
NOT(ISBLANK(PRIORVALUE( OG_Lead_Term__c )))
)









share|improve this question















I am trying to create a validation rule to lock down our original utm fields on leads after they are first populated.



Essentially I would like to prevent everyone (including our marketo sync user) but a 'system admin' to be able to update the fields below.



I think I have the Rule down for the most part, but I keep getting a syntax error "Missing ')'", please see below. Any help would be appreciated.



AND(
$Profile.Name <> "System Administrator",
ISCHANGED( OG_Lead_Source__c ),
NOT(ISBLANK(PRIORVALUE( OG_Lead_Source__c )))
ISCHANGED( OG_Lead_Medium__c ),
NOT(ISBLANK(PRIORVALUE( OG_Lead_Medium__c )))
ISCHANGED( OG_Lead_Campaign__c ),
NOT(ISBLANK(PRIORVALUE( OG_Lead_Campaign__c )))
ISCHANGED( OG_Lead_Content__c ),
NOT(ISBLANK(PRIORVALUE( OG_Lead_Content__c )))
ISCHANGED( OG_Lead_Term__c ),
NOT(ISBLANK(PRIORVALUE( OG_Lead_Term__c )))
)






validation validation-rule leads fields






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 4 at 17:20









Derek F

19.2k31849




19.2k31849










asked Jan 4 at 17:18









The Big GuyThe Big Guy

152




152












  • Note: I'd advise that you use five separate validation rules instead of just one rule. This will provide a better user experience, since you will then be able to attach the error to the correct field.
    – sfdcfox
    2 days ago


















  • Note: I'd advise that you use five separate validation rules instead of just one rule. This will provide a better user experience, since you will then be able to attach the error to the correct field.
    – sfdcfox
    2 days ago
















Note: I'd advise that you use five separate validation rules instead of just one rule. This will provide a better user experience, since you will then be able to attach the error to the correct field.
– sfdcfox
2 days ago




Note: I'd advise that you use five separate validation rules instead of just one rule. This will provide a better user experience, since you will then be able to attach the error to the correct field.
– sfdcfox
2 days ago










3 Answers
3






active

oldest

votes


















3














You're missing commas after each NOT(ISBLANK(PRIORVALUE(...))), but beyond that your validation rule isn't quite right.



This rule will only complain to the user if they try to edit all of your target fields. What you'd need here is to use some OR(), because I'd imagine that you want this validation rule to complain if any of your target fields are changed after being set for the first time.



This is probably what you're looking for



AND(
$Profile.Name <> "System Administrator",
OR(
AND(
ISCHANGED( OG_Lead_Source__c ),
NOT(ISBLANK(PRIORVALUE( OG_Lead_Source__c )))
),
AND(
ISCHANGED( OG_Lead_Medium__c ),
NOT(ISBLANK(PRIORVALUE( OG_Lead_Medium__c )))
),
AND(
ISCHANGED( OG_Lead_Campaign__c ),
NOT(ISBLANK(PRIORVALUE( OG_Lead_Campaign__c )))
),
AND(
ISCHANGED( OG_Lead_Content__c ),
NOT(ISBLANK(PRIORVALUE( OG_Lead_Content__c )))
),
AND(
ISCHANGED( OG_Lead_Term__c ),
NOT(ISBLANK(PRIORVALUE( OG_Lead_Term__c )))
)
)
)


The outer AND() exempts your system admins

The nested OR() allows you to complain if any of the inner bits evaluate to true

The inner AND()s break each situation up into their logical groups (the check for OG_Lead_Source__c shouldn't have any impact on the check for OG_Lead_Medium__c, etc...)






share|improve this answer





















  • +1 for posting literally the same validation rule logic as I did, within 3 seconds of each other :-p
    – Morgan Marchese
    Jan 4 at 17:31








  • 2




    @MorganMarchese great minds, I suppose.
    – Derek F
    Jan 4 at 17:31



















3














You are trying to do ISCHANGED() and NOT(ISBLANK(PRIORVALUE())) at the same time without separating them by commas, you can't do that. Each of those are separate arguments. You should leverage the AND and OR logical operators to bundle conditions together.



In your case, you only want to throw the error if the value is changed AND the prior value was not empty, so you should be using the AND() operator, but I also (assume) that you want it to throw the error if ANY of those fields are changed after being populated, so you should also leverage the OR() operator



The following Validation Rule is UNTESTED (but might work), but either way it should give you an understanding of what an implementation of this might look like



AND(
$Profile.Name <> "System Administrator",
OR(
AND(ISCHANGED(OG_Lead_Source__c),NOT(ISBLANK(PRIORVALUE(OG_Lead_Source__c)))),
AND(ISCHANGED(OG_Lead_Medium__c),NOT(ISBLANK(PRIORVALUE(OG_Lead_Medium__c)))),
AND(ISCHANGED(OG_Lead_Campaign__c),NOT(ISBLANK(PRIORVALUE(OG_Lead_Campaign__c)))),
AND(ISCHANGED(OG_Lead_Content__c),NOT(ISBLANK(PRIORVALUE(OG_Lead_Content__c)))),
AND(ISCHANGED(OG_Lead_Term__c),NOT(ISBLANK(PRIORVALUE(OG_Lead_Term__c))))
)
)





share|improve this answer





























    1














    Sometimes the literal error message you receive stems from a misunderstanding on the parser's part of the structure of your code due to a different error.



    In this case, you're actually missing a number of commas, not parentheses. You need commas after each value in your AND() function. You are missing commas following your first four NOT(ISBLANK(PRIORVALUE())) clauses.






    share|improve this answer





















      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "459"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f245481%2fvalidation-rule-assist-lock-down-multiple-lead-fields-after-they-are-first-popu%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      3














      You're missing commas after each NOT(ISBLANK(PRIORVALUE(...))), but beyond that your validation rule isn't quite right.



      This rule will only complain to the user if they try to edit all of your target fields. What you'd need here is to use some OR(), because I'd imagine that you want this validation rule to complain if any of your target fields are changed after being set for the first time.



      This is probably what you're looking for



      AND(
      $Profile.Name <> "System Administrator",
      OR(
      AND(
      ISCHANGED( OG_Lead_Source__c ),
      NOT(ISBLANK(PRIORVALUE( OG_Lead_Source__c )))
      ),
      AND(
      ISCHANGED( OG_Lead_Medium__c ),
      NOT(ISBLANK(PRIORVALUE( OG_Lead_Medium__c )))
      ),
      AND(
      ISCHANGED( OG_Lead_Campaign__c ),
      NOT(ISBLANK(PRIORVALUE( OG_Lead_Campaign__c )))
      ),
      AND(
      ISCHANGED( OG_Lead_Content__c ),
      NOT(ISBLANK(PRIORVALUE( OG_Lead_Content__c )))
      ),
      AND(
      ISCHANGED( OG_Lead_Term__c ),
      NOT(ISBLANK(PRIORVALUE( OG_Lead_Term__c )))
      )
      )
      )


      The outer AND() exempts your system admins

      The nested OR() allows you to complain if any of the inner bits evaluate to true

      The inner AND()s break each situation up into their logical groups (the check for OG_Lead_Source__c shouldn't have any impact on the check for OG_Lead_Medium__c, etc...)






      share|improve this answer





















      • +1 for posting literally the same validation rule logic as I did, within 3 seconds of each other :-p
        – Morgan Marchese
        Jan 4 at 17:31








      • 2




        @MorganMarchese great minds, I suppose.
        – Derek F
        Jan 4 at 17:31
















      3














      You're missing commas after each NOT(ISBLANK(PRIORVALUE(...))), but beyond that your validation rule isn't quite right.



      This rule will only complain to the user if they try to edit all of your target fields. What you'd need here is to use some OR(), because I'd imagine that you want this validation rule to complain if any of your target fields are changed after being set for the first time.



      This is probably what you're looking for



      AND(
      $Profile.Name <> "System Administrator",
      OR(
      AND(
      ISCHANGED( OG_Lead_Source__c ),
      NOT(ISBLANK(PRIORVALUE( OG_Lead_Source__c )))
      ),
      AND(
      ISCHANGED( OG_Lead_Medium__c ),
      NOT(ISBLANK(PRIORVALUE( OG_Lead_Medium__c )))
      ),
      AND(
      ISCHANGED( OG_Lead_Campaign__c ),
      NOT(ISBLANK(PRIORVALUE( OG_Lead_Campaign__c )))
      ),
      AND(
      ISCHANGED( OG_Lead_Content__c ),
      NOT(ISBLANK(PRIORVALUE( OG_Lead_Content__c )))
      ),
      AND(
      ISCHANGED( OG_Lead_Term__c ),
      NOT(ISBLANK(PRIORVALUE( OG_Lead_Term__c )))
      )
      )
      )


      The outer AND() exempts your system admins

      The nested OR() allows you to complain if any of the inner bits evaluate to true

      The inner AND()s break each situation up into their logical groups (the check for OG_Lead_Source__c shouldn't have any impact on the check for OG_Lead_Medium__c, etc...)






      share|improve this answer





















      • +1 for posting literally the same validation rule logic as I did, within 3 seconds of each other :-p
        – Morgan Marchese
        Jan 4 at 17:31








      • 2




        @MorganMarchese great minds, I suppose.
        – Derek F
        Jan 4 at 17:31














      3












      3








      3






      You're missing commas after each NOT(ISBLANK(PRIORVALUE(...))), but beyond that your validation rule isn't quite right.



      This rule will only complain to the user if they try to edit all of your target fields. What you'd need here is to use some OR(), because I'd imagine that you want this validation rule to complain if any of your target fields are changed after being set for the first time.



      This is probably what you're looking for



      AND(
      $Profile.Name <> "System Administrator",
      OR(
      AND(
      ISCHANGED( OG_Lead_Source__c ),
      NOT(ISBLANK(PRIORVALUE( OG_Lead_Source__c )))
      ),
      AND(
      ISCHANGED( OG_Lead_Medium__c ),
      NOT(ISBLANK(PRIORVALUE( OG_Lead_Medium__c )))
      ),
      AND(
      ISCHANGED( OG_Lead_Campaign__c ),
      NOT(ISBLANK(PRIORVALUE( OG_Lead_Campaign__c )))
      ),
      AND(
      ISCHANGED( OG_Lead_Content__c ),
      NOT(ISBLANK(PRIORVALUE( OG_Lead_Content__c )))
      ),
      AND(
      ISCHANGED( OG_Lead_Term__c ),
      NOT(ISBLANK(PRIORVALUE( OG_Lead_Term__c )))
      )
      )
      )


      The outer AND() exempts your system admins

      The nested OR() allows you to complain if any of the inner bits evaluate to true

      The inner AND()s break each situation up into their logical groups (the check for OG_Lead_Source__c shouldn't have any impact on the check for OG_Lead_Medium__c, etc...)






      share|improve this answer












      You're missing commas after each NOT(ISBLANK(PRIORVALUE(...))), but beyond that your validation rule isn't quite right.



      This rule will only complain to the user if they try to edit all of your target fields. What you'd need here is to use some OR(), because I'd imagine that you want this validation rule to complain if any of your target fields are changed after being set for the first time.



      This is probably what you're looking for



      AND(
      $Profile.Name <> "System Administrator",
      OR(
      AND(
      ISCHANGED( OG_Lead_Source__c ),
      NOT(ISBLANK(PRIORVALUE( OG_Lead_Source__c )))
      ),
      AND(
      ISCHANGED( OG_Lead_Medium__c ),
      NOT(ISBLANK(PRIORVALUE( OG_Lead_Medium__c )))
      ),
      AND(
      ISCHANGED( OG_Lead_Campaign__c ),
      NOT(ISBLANK(PRIORVALUE( OG_Lead_Campaign__c )))
      ),
      AND(
      ISCHANGED( OG_Lead_Content__c ),
      NOT(ISBLANK(PRIORVALUE( OG_Lead_Content__c )))
      ),
      AND(
      ISCHANGED( OG_Lead_Term__c ),
      NOT(ISBLANK(PRIORVALUE( OG_Lead_Term__c )))
      )
      )
      )


      The outer AND() exempts your system admins

      The nested OR() allows you to complain if any of the inner bits evaluate to true

      The inner AND()s break each situation up into their logical groups (the check for OG_Lead_Source__c shouldn't have any impact on the check for OG_Lead_Medium__c, etc...)







      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered Jan 4 at 17:30









      Derek FDerek F

      19.2k31849




      19.2k31849












      • +1 for posting literally the same validation rule logic as I did, within 3 seconds of each other :-p
        – Morgan Marchese
        Jan 4 at 17:31








      • 2




        @MorganMarchese great minds, I suppose.
        – Derek F
        Jan 4 at 17:31


















      • +1 for posting literally the same validation rule logic as I did, within 3 seconds of each other :-p
        – Morgan Marchese
        Jan 4 at 17:31








      • 2




        @MorganMarchese great minds, I suppose.
        – Derek F
        Jan 4 at 17:31
















      +1 for posting literally the same validation rule logic as I did, within 3 seconds of each other :-p
      – Morgan Marchese
      Jan 4 at 17:31






      +1 for posting literally the same validation rule logic as I did, within 3 seconds of each other :-p
      – Morgan Marchese
      Jan 4 at 17:31






      2




      2




      @MorganMarchese great minds, I suppose.
      – Derek F
      Jan 4 at 17:31




      @MorganMarchese great minds, I suppose.
      – Derek F
      Jan 4 at 17:31













      3














      You are trying to do ISCHANGED() and NOT(ISBLANK(PRIORVALUE())) at the same time without separating them by commas, you can't do that. Each of those are separate arguments. You should leverage the AND and OR logical operators to bundle conditions together.



      In your case, you only want to throw the error if the value is changed AND the prior value was not empty, so you should be using the AND() operator, but I also (assume) that you want it to throw the error if ANY of those fields are changed after being populated, so you should also leverage the OR() operator



      The following Validation Rule is UNTESTED (but might work), but either way it should give you an understanding of what an implementation of this might look like



      AND(
      $Profile.Name <> "System Administrator",
      OR(
      AND(ISCHANGED(OG_Lead_Source__c),NOT(ISBLANK(PRIORVALUE(OG_Lead_Source__c)))),
      AND(ISCHANGED(OG_Lead_Medium__c),NOT(ISBLANK(PRIORVALUE(OG_Lead_Medium__c)))),
      AND(ISCHANGED(OG_Lead_Campaign__c),NOT(ISBLANK(PRIORVALUE(OG_Lead_Campaign__c)))),
      AND(ISCHANGED(OG_Lead_Content__c),NOT(ISBLANK(PRIORVALUE(OG_Lead_Content__c)))),
      AND(ISCHANGED(OG_Lead_Term__c),NOT(ISBLANK(PRIORVALUE(OG_Lead_Term__c))))
      )
      )





      share|improve this answer


























        3














        You are trying to do ISCHANGED() and NOT(ISBLANK(PRIORVALUE())) at the same time without separating them by commas, you can't do that. Each of those are separate arguments. You should leverage the AND and OR logical operators to bundle conditions together.



        In your case, you only want to throw the error if the value is changed AND the prior value was not empty, so you should be using the AND() operator, but I also (assume) that you want it to throw the error if ANY of those fields are changed after being populated, so you should also leverage the OR() operator



        The following Validation Rule is UNTESTED (but might work), but either way it should give you an understanding of what an implementation of this might look like



        AND(
        $Profile.Name <> "System Administrator",
        OR(
        AND(ISCHANGED(OG_Lead_Source__c),NOT(ISBLANK(PRIORVALUE(OG_Lead_Source__c)))),
        AND(ISCHANGED(OG_Lead_Medium__c),NOT(ISBLANK(PRIORVALUE(OG_Lead_Medium__c)))),
        AND(ISCHANGED(OG_Lead_Campaign__c),NOT(ISBLANK(PRIORVALUE(OG_Lead_Campaign__c)))),
        AND(ISCHANGED(OG_Lead_Content__c),NOT(ISBLANK(PRIORVALUE(OG_Lead_Content__c)))),
        AND(ISCHANGED(OG_Lead_Term__c),NOT(ISBLANK(PRIORVALUE(OG_Lead_Term__c))))
        )
        )





        share|improve this answer
























          3












          3








          3






          You are trying to do ISCHANGED() and NOT(ISBLANK(PRIORVALUE())) at the same time without separating them by commas, you can't do that. Each of those are separate arguments. You should leverage the AND and OR logical operators to bundle conditions together.



          In your case, you only want to throw the error if the value is changed AND the prior value was not empty, so you should be using the AND() operator, but I also (assume) that you want it to throw the error if ANY of those fields are changed after being populated, so you should also leverage the OR() operator



          The following Validation Rule is UNTESTED (but might work), but either way it should give you an understanding of what an implementation of this might look like



          AND(
          $Profile.Name <> "System Administrator",
          OR(
          AND(ISCHANGED(OG_Lead_Source__c),NOT(ISBLANK(PRIORVALUE(OG_Lead_Source__c)))),
          AND(ISCHANGED(OG_Lead_Medium__c),NOT(ISBLANK(PRIORVALUE(OG_Lead_Medium__c)))),
          AND(ISCHANGED(OG_Lead_Campaign__c),NOT(ISBLANK(PRIORVALUE(OG_Lead_Campaign__c)))),
          AND(ISCHANGED(OG_Lead_Content__c),NOT(ISBLANK(PRIORVALUE(OG_Lead_Content__c)))),
          AND(ISCHANGED(OG_Lead_Term__c),NOT(ISBLANK(PRIORVALUE(OG_Lead_Term__c))))
          )
          )





          share|improve this answer












          You are trying to do ISCHANGED() and NOT(ISBLANK(PRIORVALUE())) at the same time without separating them by commas, you can't do that. Each of those are separate arguments. You should leverage the AND and OR logical operators to bundle conditions together.



          In your case, you only want to throw the error if the value is changed AND the prior value was not empty, so you should be using the AND() operator, but I also (assume) that you want it to throw the error if ANY of those fields are changed after being populated, so you should also leverage the OR() operator



          The following Validation Rule is UNTESTED (but might work), but either way it should give you an understanding of what an implementation of this might look like



          AND(
          $Profile.Name <> "System Administrator",
          OR(
          AND(ISCHANGED(OG_Lead_Source__c),NOT(ISBLANK(PRIORVALUE(OG_Lead_Source__c)))),
          AND(ISCHANGED(OG_Lead_Medium__c),NOT(ISBLANK(PRIORVALUE(OG_Lead_Medium__c)))),
          AND(ISCHANGED(OG_Lead_Campaign__c),NOT(ISBLANK(PRIORVALUE(OG_Lead_Campaign__c)))),
          AND(ISCHANGED(OG_Lead_Content__c),NOT(ISBLANK(PRIORVALUE(OG_Lead_Content__c)))),
          AND(ISCHANGED(OG_Lead_Term__c),NOT(ISBLANK(PRIORVALUE(OG_Lead_Term__c))))
          )
          )






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 4 at 17:30









          Morgan MarcheseMorgan Marchese

          1,485426




          1,485426























              1














              Sometimes the literal error message you receive stems from a misunderstanding on the parser's part of the structure of your code due to a different error.



              In this case, you're actually missing a number of commas, not parentheses. You need commas after each value in your AND() function. You are missing commas following your first four NOT(ISBLANK(PRIORVALUE())) clauses.






              share|improve this answer


























                1














                Sometimes the literal error message you receive stems from a misunderstanding on the parser's part of the structure of your code due to a different error.



                In this case, you're actually missing a number of commas, not parentheses. You need commas after each value in your AND() function. You are missing commas following your first four NOT(ISBLANK(PRIORVALUE())) clauses.






                share|improve this answer
























                  1












                  1








                  1






                  Sometimes the literal error message you receive stems from a misunderstanding on the parser's part of the structure of your code due to a different error.



                  In this case, you're actually missing a number of commas, not parentheses. You need commas after each value in your AND() function. You are missing commas following your first four NOT(ISBLANK(PRIORVALUE())) clauses.






                  share|improve this answer












                  Sometimes the literal error message you receive stems from a misunderstanding on the parser's part of the structure of your code due to a different error.



                  In this case, you're actually missing a number of commas, not parentheses. You need commas after each value in your AND() function. You are missing commas following your first four NOT(ISBLANK(PRIORVALUE())) clauses.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Jan 4 at 17:27









                  David ReedDavid Reed

                  30.9k61746




                  30.9k61746






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Salesforce Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.





                      Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                      Please pay close attention to the following guidance:


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f245481%2fvalidation-rule-assist-lock-down-multiple-lead-fields-after-they-are-first-popu%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      "Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

                      Alcedinidae

                      RAC Tourist Trophy