ui policy script previous or current

lilla
Tera Contributor

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

2 REPLIES 2

georgimavrodiev
Mega Guru

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


Mihir Mohanta
Kilo Sage

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