
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2024 02:00 AM
Hi Team,
I have a query I have written a before update BR, and I am comparing the date field. but I am getting the error message multiple times if the condition meets?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2024 02:05 AM
Hi @Community Alums ,
If multiple records are updating at a time then yes above error msg will show those many times.
thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2024 03:07 AM - edited 03-18-2024 03:46 AM
Hi @Ankur20,
A query business rule can legitimately be called multiple times meaning the message will appear (and be duplicated) each and everytime, however, a good way to make sure the cache is clear is to leverage the below syntax:
gs.flushMessages()
Call this before your gs.addErrorMessage() call.
To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Helpful.
Thanks, Robbie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2024 03:07 AM - edited 03-18-2024 03:46 AM
Hi @Ankur20,
A query business rule can legitimately be called multiple times meaning the message will appear (and be duplicated) each and everytime, however, a good way to make sure the cache is clear is to leverage the below syntax:
gs.flushMessages()
Call this before your gs.addErrorMessage() call.
To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Helpful.
Thanks, Robbie