Error Message

Rai Shivam Ajay
Tera Contributor

Error Messaging:
When creating or editing a user, if an account was previously selected, and a region is then selected, that is different than the region for the Account that was previously slected, an error message needs to be presented "There are Account(s) in the Account Access field are not in the selected Region. Either remove the selected Account from the Account Access field or select a different Region.".
As below I am attaching the screenshot.
Please any one can help me. Thank you

2 REPLIES 2

johnfeist
Mega Sage
Mega Sage

Hi Rai,

 

You would handle this with a before update business rule.  In there you can do your checks around accounts and regions.  If you find the error condition, you can then use gs.addErrorMessage() to post the message.  You can also use current.setAbortAction(true)  to stop the update from saving.

Hope that helps.

:{)

Helpful and Correct tags are appreciated and help others to find information faster

TinaHigginson
Giga Contributor

I see you've described the error message and its trigger conditions. To provide a more specific solution or code implementation, I would need to know the programming language and environment in which you're working. If you could share those details, I'd be happy to assist further.