Set a server side parameter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-01-2016 12:50 PM
Hi ,
I just want to add a parameter server-side through business rule and i want to use getparameter to retrieve that value.
i can pass the value as an argument to the function of script include but i want to do this way without touching the pre defined servicenow script include.
script include has this.getParameter('abc');
i want to set this via 'abc' by business rule.
can i do that ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-01-2016 01:22 PM
Hi Abhay,
If you are looking at a script include that references this.getParameter() it indicates it is client callable and (more than likely) intended to be used with a Client Script in a GlideAjax operation. I don't believe you can call the login in that script include from a business rule. What's more, passing the parameters isn't part of how they work.
I recommend you use the logic you need from the script include in your own script include and call that from your business rule.
Reference:
Business Rules - ServiceNow Wiki
Business Rules Best Practices - ServiceNow Wiki
Script Includes - ServiceNow Wiki
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2016 07:44 AM
you really don't need to do that.. just use a view BR to set a scratchpad variable..
g_scratchpad.variable_name = value;
then in client scripts you can reference g_scratchpad.variable_name anytime you want..
only use these when needed as they do run every time a record on the table is viewed.