Order guide variables to be passed to sc_request
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-20-2016 01:43 AM
Hello folks, is it possible to pass the variable values given during the first stage of an Order Guide to the subsequent service catalog request(sc_request) that gets created ?
This is for a New Starter order guide which has a few variables like Department/Business/Start Date/Emp type etc., which do not have an associated catalog item. Is there a way to see all these variables on the REQ form that gets created from this order guide ?
Any thoughts on this please ?
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-20-2017 11:06 AM
Hi,
It could be too late to reply. but may be useful for those who are searching for this solution.
variables data on Order guide describe needs form will be stored on 'current guide serial' field on sc_cart table once you navigated to choose options page. once you click checkout this data get deleted. so create a custom variable on 'sc_cart' table. Write onsubmit script on order guide, using glide ajax , copy 'current guide serial' data to your custom field.
You can retrieve this data on sc_request table using 'Before insert' business rule.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2017 10:19 PM
Hi Prakash,
Can you please share the sample script if you have? I have the similar requirement.
Thanks & Regards,
Shugufta.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2017 10:44 PM
Write a After BR on 'sc_request' table. After passing the variables, make sure you hide them using a catalog UI policy/catalog client script
Script :
var gr = new GlideRecord('sc_req_item');
gr.addQuery('request', current.sys_id);
gr.addQuery('cat_item','fa42a4910f1f1a0097be5c3be1050eb1'); //use any item here
gr.query();
if (gr.next()) {
current.u_business = gr.variables.sel_business;
current.u_department = gr.variables.department;
current.u_employee_location = gr.variables.location;
current.u_start_date = gr.variables.start_date;
current.u_end_date = gr.variables.end_date;
current.u_first_name = gr.variables.first_name;
current.u_last_name = gr.variables.last_name;
current.u_manager = gr.variables.manager;
current.u_job_title = gr.variables.job_title;
current.u_mobile_phone = gr.variables.mobile_phone;
current.u_desk_phone = gr.variables.deskphone;
current.u_shared_mailbox = gr.variables.shared_access;
current.u_network_shares = gr.variables.network_share;
current.u_printer_access = gr.variables.printer_access;
current.u_employment_type = gr.variables.employment_type;
current.u_new_hire_replacement = gr.variables.new_replacement;
current.u_hardware_options = gr.variables.desk_laptop;
current.u_replacing_staff = gr.variables.replacing_staff;
//current.update();
}
Please mark the response as helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2017 10:50 PM
Hi Suhas,
The variables which are in describe needs section are populated through variable set. I need these to be displayed in RITM variables. It is working fine for catalog item variables.
Thanks & Regards,
Shugufta.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2017 11:04 PM
Correct, the current.<fields> in the script are all the new fields that you need to create