- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2018 09:26 AM
I am trying to add an addInfoMessage that will say You are viewing the child incident. A business rule will run and check the parent field and if the parent field is filled then it will show the message and if it doesn't do nothing. I tried this code, but can get it to work
(function executeRule(current, previous /*null when async*/) {
var childBanner = new Gliderecord('incident');
childBanner.query();
if(childBanner.parent){
childBanner.addInfoMessage("You are viewing the child incident");
}
else{
return;
}
return;
})(current, previous);
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2018 11:55 PM
Hi,
In your code you have used 'childBanner.addInfoMessage("You are viewing the child incident") instead of gs.addInfoMessage('You are viewing the child incident'). Please provide the condition as below,
In script:-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2018 09:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2018 11:55 PM