0

I have a validation rule and it should display the error message under a checkbox field 'Consent received to add as a Contact ?' but it is always displaying the error on the header of the page.

I have tried with Before Trigger as well as Before Save flow as well but all of these are displaying the error on the top of the page.

Pls find below screenshot for your reference.

enter image description here

Please help me on this. I'm totally stucked on this. Thanking you in anticipation.

2 Answers 2

0

It looks like the New Contact page has been overridden by a custom Lightning component. It is up to that component to handle validation errors correctly, and it looks like it is just printing them at the top no matter what.

To check this, go to Setup → Object Manager → Contact → Buttons, Links, and Actions → Edit. Check the Content Source to see if it is a Lightning Component or just the Standard Page.

If it is a Lightning Component as I suspect, then you will need to contact whoever developed it.

1
  • 1
    Thank you . such a life saviour.. :) Commented Nov 10, 2023 at 15:19
0

There are a few possible reasons why your validation rule error message is not displaying under the checkbox field but on the top of the page. Here are some of them:

  • The checkbox field is not editable on the page layout. If the field is read-only or hidden, the error message will not appear next to it, but on the top of the page. You can check the field-level security and the page layout settings to ensure the field is editable for the users who need to see the error message.
  • The checkbox field is not set as the error location in the validation rule. If the error location is set to "Top of Page" or another field, the error message will not appear next to the checkbox field, but on the specified location.
3
  • I have checked over the FLS/Page layout both. Field is editable/visible for all the users and added to page layout as well. In page layout also, field is not read only. Error location is also set to this checkbox field. It's very weird actually. Pls suggest some more possible options on this. Commented Nov 10, 2023 at 10:36
  • In Salesforce Classic it is working fine but not in LEX. I don't know what is the issue. Please help. Commented Nov 10, 2023 at 10:47
  • Hi Everyone, Any other suggestions please ? I'm totally stucked right now. Tried almost everything given on the google. Commented Nov 10, 2023 at 12:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .