- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-31-2020 08:21 AM
I am creating an advanced after business rule on the sys_attachment table and currently in the script i just have it adding an info message to let me know if the business rule is actually getting run. I have a form for a different table that has a picture field and at the top of the form there is also a manage attachments button at the top where you can add attachments and this is what i am using to test the business rule. When I add an attachment via the picture field, the business rule runs and the info message in the script pops up. However, when i add an attachment via the manage attachments button, the business rule does not run. I've looked in the community about business rules not running and some of them say it may be due to another business rule that is setting a workflow to false which is in turn stopping the business rule but i have no idea what other business rule would be doing that considering there are about 2000 other business rules. is there a way to narrow down the business rules to find which one might be causing it or what else might be causing the rule to not run? I know the nature of the sys_attachment table is a little bit odd so i was thinking maybe that could have something to do with it? I have attached an image of my business rule script and the methods that i am using to add attachments
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-31-2020 09:39 AM
you need to use the statement like as below:
gs.log("Executing Line Number 78 "+ <Intrested variable Name>);
and check in the sys_log table, whether this is getting logged or not.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-31-2020 10:57 AM
I used the system logs and the messages are actually being logged, so the business rule is running. Thank you for introducing me to better debugging habits haha. However, the business rule does not seem to be running if i upload an attachment via the NowMobile app, would you happen to know why the business rule would act differently when adding to a table via the mobile app?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-31-2020 01:00 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-31-2020 01:11 PM
Did you checked whether the attachment is added into the sys_attachment table or not when you submitted via Now mobile app?
Muhammad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-31-2020 01:17 PM
yes i did, the attachment was being added. Ashley was right, it seemed like the business rule want running because i was using gs.addInfoMessage() when really the business rule was running but the info message wasn't displaying because of the way the sys_attachment table works