ATF can I fetch variable value (user) in run server site script to impersonate
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2024 12:27 AM
Following is the code I have written,
RITM is having that variable called v_brcl which has reference user
above is the field from RITM, which is submitted variable on the form.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2024 04:56 AM
Hi @Prathamesh Cha1 !
I would suggest you have glide record query to fetch the respective RITM record and then try set it in the output.
(function(outputs, steps, params, stepResult, assertEqual) {
// add test script here
var ritmId = steps(/*<sys_id of the step interacting with RITM record>*/).record_id;
var ritm = new GlideRecord("sc_req_item");
ritm.get(ritmId);
steps.outputs.record_id = ritm.variables.variable_name;
return true;
})(outputs, steps, params, stepResult, assertEqual);