- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-07-2018 01:26 AM
Hi All,
I am having issue where i want to throw alert to user in business rule. Currently my business rule is running on sys_attachment table. The condition is like below :
The code is like below which checks if the file size is greater than certain limit :
(function executeRule(current, previous /*null when async*/) {
var i = parseInt(current.size_bytes);
gs.addErrorMessage('i is' + i);
if(i > 10)
{
current.setAbortAction(true);
gs.log('-=--------------------------i is' + i);
gs.addInfoMessage("File Size is too large");
}
})(current, previous);
All other script work but none of the gs.addInfoMessage() functions are working. I can able to see the log message and action is getting aborted as per script just needed the alert message throw to user.
I have tired various solution provided in community and forum but none of them worked.
Can someone please help on this case
Regards,
Naresh
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-22-2018 05:31 AM
Just to update on this, I have achieved this by adding some code in UI page which helped me to restrict based on image size.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-07-2018 05:14 AM
Hi,
Just take out the line:
gs.setRedirect(current);
not sure how that krept in.
Regards
Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-07-2018 05:19 AM
Hi Paul,
After taking out that line the alert doesn't even comes in other open tab.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-22-2018 05:31 AM
Just to update on this, I have achieved this by adding some code in UI page which helped me to restrict based on image size.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-18-2021 05:41 AM
Hi Naresh,
Can you please provide more details on how you achieved this?
Thank you