- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2016 07:28 AM
I have enabled the New Call feature in ServiceNow (Fuji) and have an inbound action that pulls emails into the system into a new call and then I choose if it's a request or an incident.
If I chose request then it will be one catalog item called Quick Request. I use the OOB (only a couple of changes) 'CallTypeChanged to Request' business rule to pull the information into the requested item but when info of the new_call description field comes into the requested item description (which is a variable) it loses it's formatting. Is there any way to keep the formatting correct in the variable?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2016 08:21 AM
Screenshot from my Fuji system... It seems to be there. Not sure why you aren't seeing it. It might be time to call customer support.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2016 12:18 PM
Is your target variable is of type string? Can you also provide a snapshot of your sample new call description.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2016 12:24 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2016 02:15 PM
Here you go,
You just need to encode your URL and you are good to go. Make sure the target variable is of string type not html.
var reqFor = current.caller;
var location = current.caller.location;
var reqItem = current.request_item;
var comments = "NEW_CALL_REF:"+current.sys_id+" "+current.description;
getCart();
var url = 'com.glideapp.servicecatalog_cat_item_view.do?sysparm_id=' + reqItem + '&sysparm_user=' + reqFor + '&sysparm_short_description=' + current.short_description + '&sysparm_description=' + current.description;
action.setRedirectURL(encodeURI(url));
function getCart() {
var cart = new GlideRecord('sc_cart');
var userid = gs.getUserID();
cart.addQuery('user', userid);
cart.query();
if (cart.next()) {
// We already have a cart so override the requested for value and empty it
cart.requested_for = reqFor;
cart.special_instructions = comments;
cart.delivery_address = getDeliveryAddress();
cart.update();
var cartItems = new GlideRecord('sc_cart_item');
cartItems.addQuery('cart', cart.sys_id);
cartItems.deleteMultiple();
} else {
cart.initialize();
cart.user = userid;
cart.requested_for = reqFor;
cart.special_instructions = comments;
cart.delivery_address = getDeliveryAddress();
cart.insert();
}
return cart;
}
function getDeliveryAddress() {
var gr = new GlideRecord('cmn_location');
if (!gr.get(location))
return '';
var text = '';
if (!gr.street.nil())
text = gr.street + '\n';
if (!gr.city.nil() && !gr.state.nil() && !gr.zip.nil())
text += gr.city + ", " + gr.state + ", " + gr.zip;
return text;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2016 02:39 PM
That's it, fantastic.
Thank you so much, I would never have got that.