Order guide variables to be passed to sc_request

ramak
Giga Expert

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 ?

14 REPLIES 14

prakashgowda
Kilo Contributor

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.


Hi Prakash,



Can you please share the sample script if you have? I have the similar requirement.



Thanks & Regards,


Shugufta.


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.


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.


Correct, the current.<fields> in the script are all the new fields that you need to create