How to get action name in a Business Rule (Server Side script)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2016 09:57 AM
I know 'g_form.getActionName()' can be used in client-side script to identify the action name, what is the equivalent command on a server-side script ? I will need to identify the action that triggered the business rule to add a condition (on the business rule condition field or the script) based on that.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2016 01:49 PM
Got it. Please refer the below thread here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2016 01:57 PM
Hi Pradeep, Looks like the link you shared to identify the action name is for Client Scripts. But I will need something like that on a Business Rule. Please take a look at the context below to better understand my requirement :
I am implementing a Business Rule as in the question - Point Create New to Record Producer. I am trying to add some logic in the business rule such that 'Copy Change' doesn't get redirected to Record Producer. So I am basically trying to identify the button/link behind the trigger.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2016 02:56 PM
In the thread I referred, did you get a chance to look the section
Identifying the action name in a business rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2016 03:03 PM
Yes Pradeep, I referred to that and noticed 'action.getActionName()' used to be an option in Business Rule but it has been removed by Service Now. Am I missing something that helps my problem from the article ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-09-2017 08:19 AM
Unless, there is a better option, you can achieve it by treating "current" GlideRecord object as a javascript object. Set a temporary (i.e. runtime) attribute of "current" object and read it in a business rule.
UI Action:
...
current.t_source_ui_action = "copy_change";
current.update();
...
Business rule run condition:
current.t_source_ui_action == "copy_change";