- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2020 11:33 PM
Hi.
I have to transfer contents of a Client Script in a Business Rule.
The following statements of the client script, i dont know how to convert to a business rule:-(g_form.getActionName()=='sysverb_update_and_stay' || g_form.getActionName()=='a831a099dbfe1b8057a9ffe61d961945' || g_form.getActionName()=='sysverb_update' ).
I am unable to find the relevant BR functions. Please help.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2020 12:15 AM
if i look into your client script , i can see the most of the action name works for update operation. so if you will use the business rule on update operation ( set update as true) then it should work. no need to check action name.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2020 12:22 AM
Yeah...i need that if portal users are updating an incident along with the above actions then the u_source field should get saved as "Portal". Ad we use ESS view in portal, so i am checking that.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2020 12:26 AM
Hi,
Is the view name present in URL?
Try to log map in your script and see what you get
Thanks,
Ashutosh

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2020 12:15 AM
if i look into your client script , i can see the most of the action name works for update operation. so if you will use the business rule on update operation ( set update as true) then it should work. no need to check action name.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2020 12:33 AM
Okk thank you..can you also help me in fetching the view name pls? The one i scripted above is not giving the correct view name, it gives null...
I will close this question after that then...thanks in advance

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2020 12:49 AM
it would be more easy for you if you will use onSubmit client script instead of business rule to set the value based on view
are you getting any parameter related to View on browser url ?
function onSubmit() {
if( g_form.getViewName() == 'viewname'){
g_form.setValue('field name', 'valueyouwanttoset');
}
}