ui policy script previous or current
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-04-2017 12:46 AM
Hello Dear,
Can I use in ui policy script condition the previous or current? I would like to run the ui policy if the previous.state is closed complete.
Thanks,
Lilla
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-04-2017 01:04 AM
Hello Lilla,
I believe you cannot use previous and current in UI policies scripts. That's the answer of your question.
As a workaround, in regards to your request, you may create a custom field: for example: Previous State (u_previous_state) and use a UI policy and a Business Rule to achieve your goal.
Best Regards,
Georgi Mavrodiev
IT Consultant
Do IT Wise
You may visit us in our Web Site: www.doitwise.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-04-2017 02:22 AM
You can write an on change client script which will run when state changes.
Inside the script you can add condition to run the script when
oldValue : closed complete
Please go through the below link.
http://wiki.servicenow.com/index.php?title=Client_Scripts#gsc.tab=0