- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2017 01:54 AM
Hi,
I am trying to make a client script with the condition View == self_service and if true I want to set the state to Active. Here's my code but it is not working. Do you have any other way to meet what I am trying to do?
function onLoad() {
//Type appropriate comment here, and begin script below
var view = getView();
if (view == 'self_service'){
g_form.setValue('state','2');
}
}
Solved! Go to Solution.
- Labels:
-
Best Practices
-
Team Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2017 02:04 AM
- function onLoad() {
- //Type appropriate comment here, and begin script below
- var view = getView();
- if (view == 'ess'){ //self service view name is ess so make to ess
- g_form.setValue('state','2');
- }
- }
try this script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2017 02:33 AM
Thank you all for your help!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2020 09:59 PM
Self Service is the title of the View. If you want to know the View's name, go to System UI -> View to see the name of the view
