Is there a way to set some value to scratchpad in the script include and pass the same to business rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2016 03:49 AM
Hi,
Is there a way to add some value to scratchpad variable in the script include and pass the same scratchpad to business rule like we have the display business rule to retrieve the database value using g_scratchpad and pass it same in the client script.
Thanks,
Mahesh.
- Labels:
-
Scripting and Coding
-
Team Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2016 03:58 AM
you could call the script include in the business rule and populate scratchpad with the results.
g_scratchpad.variable = new scriptInclude().returnSomething();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2016 04:19 AM
Hi mguy,
Thanks for your reply. But i want it in the opposite way.Below is the scenario.
There is a catalog method to update the assigned to of a records to new person. and This change they are doing it in the script include through glide Ajax.
When there is a change in assigned to, there is a business on the same table with condition after the assigned to changes and runs the script. So here i want set a condition in such a way that when the change is happening from the method don't run this BR. I know we can introduce a flag value and set to true in the script include and add this condition in the business for not executing. I can have one more Business rule to reset this flag value to false again and with order so that first it will check the lower order BR first and execute the other BR.
Is there a way we can achieve this with scratchpad. Or any other solution which will be possible. Our client is not accepting to create a new filed in the table.
Thanks,
Mahesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2016 04:30 AM
could you update the record with setWorkflow(false);?
gr.setWorkflow(false);
gr.update();
this updates a record without running business rules so if you want the record to be updated 'silently' you could use this maybe?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2016 05:19 AM
If i set gr.setWorkflow(false); it skips running other business rules.
Thanks,
Mahesh.