- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2018 08:10 PM
So I am new to the Service Desk Call option,
I was able to get the Incident information the way I want, now I wanted to create a General Request item - I have tried using the format of
New call to create generic request`
However it just isnt copying any of my data from the NewCall to the request/item and not actually submitting the request.
Would anyone be willing to share their experiences/code?
basically i want to take
short_description to task short description
description to task description
caller to task requested for
assignment group to task assignment group
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2018 03:54 AM
HI William,
Check this out:
createServiceRequest();
function createServiceRequest() {
var cart = new Cart();
var item = cart.addItem('af695d47314610003e55ce5fcb8deb06');
cart.setVariable(item, 'short_description', current.short_description);
cart.setVariable(item, 'description', current.description);
cart.setVariable(item, 'sr_cmdb_ci', current.cmdb_ci);
cart.setVariable(item, 'sr_resolver_group', current.assignment_group);
var cartGR = cart.getCart();
cartGR.requested_for = current.u_affected_person;
cartGR.update();
var newSerReq = cart.placeOrder();
newSerReq.opened_by = current.caller_id;
newSerReq.update();
var activityLogMsg = 'Your Incident ' + current.number + ' has been cancelled and a Service Request ' + newSerReq.number + ' is created. No action is needed on your part';
current.state = 5;
current.active = false;
current.work_notes = activityLogMsg;
current.parent = getRITM(newSerReq.sys_id);
current.update();
var disMessage = 'Incident ' + current.number + ' has been cancelled and your work will be captured via the newly created Service Request ' + newSerReq.number;
gs.addInfoMessage(disMessage);
action.setRedirectURL(newSerReq);
action.setReturnURL(current);
}
function getRITM(serReq) {
var ritm = '';
var grRITM = new GlideRecord('sc_req_item');
grRITM.addQuery('request',serReq);
grRITM.query();
if(grRITM.next()) {
ritm = grRITM.sys_id;
}
return ritm;
}
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2018 05:32 AM
@Michael Fry
We are just now starting to explore this feature. We wanted to start out with a single General Request and then build from there. Currently our catalog items were built by different people so the variable names etc are all different. I was having some issues getting the variables to transfer from the New Call to the Catalog Item/cart.