Business Rule triggered from an Order Guide submission to save a variable?

randlm
Tera Contributor

I have a new field on the Request table named u_opened_for. We have an Order Guide with a New Hire field that is not translated to any ordered items. We want the new hire field to be 'saved' to the 'Opened For' field. Any idea if this is possible?

Thanks!

3 REPLIES 3

nitin_kumar
Mega Guru

Hi Randy,



Write a business rule which runs before insert on the 'Requested Item' table. Your script will look like this



current.request.u_opened_for = current.variables.[name of the variable that you want to populate];



Make sure to use 'Filter Condition' so that the business rule runs when the requested item is created from that particular order guide to improve performance.



Thanks,


Nitin.



Hit Like, Helpful or Correct based on the impact of the response


Thank you Nitin,



Unfortunately that didn't work. My issue is getting the variables from the Order Guide. current.variable.<order guide var> comes up empty.


Hi Randy,



You can create the new hire variable with the same name on one of the catalog items that gets fired from the Order Guide and because of the cascading variable functionality of the order guide the new hire variable on the catalog item will get populated automatically. Then you can use the BR I have mentioned above.


Refer from module 6.1 from the below link


http://wiki.servicenow.com/index.php?title=Service_Catalog_Order_Guides#Cascading_the_Order_Guide_Va...



Thanks,


Nitin.


Hit Like, Helpful or Correct based on the impact of the response