sysparm_processing_hint in Create Request UI Action

kungfuu72
Giga Expert

On the Incident table, there is a particular out-of-box UI Action that I'm going to modify to be more intuitive and useful for us.

The UI Action is called Create Request.

 

Out-of-box Code:

//Update saves incidents before going to the catalog homepage
current.update();
gs.addInfoMessage('You will need to navigate back to incident ' + current.number + ' upon request completion');


var url = "catalog_home.do?sysparm_view=catalog_default&sysparm_processing_hint=setfield:request.parent="
url += current.sys_id;


action.setRedirectURL(url);


 

 

What is interesting about this simple UI Action is the sysparm_processing_hint in the URL. This URL parameter is setting the parent field of the Request record to the Incident (sc_request).

 

My question is whether you can set other fields on other tables OR multiple fields on a new/existing record

 

For example:

 

Instead of going to the Service Catalog, my redirect will go to a new Requested Item (sc_req_item) form where the:

 

var url = "sc_req_item.do?sysparm_processing_hint=setfield:sc_req_item.assigned_to=";
url += current.assigned_to.sys_id;


 

 

I'm going to test this out, but does anyone have anymore information about the sysparm_processing_hint URL parameter? I was not able to find anything about it on the forums or the Wiki... ?

 

Mark Stanger (Crossfuze)

Maybe a good use-case in a Crossfuze Solutions if this URL parameter turns out to be extensive.

9 REPLIES 9

camds
Kilo Expert

Hi Daniel,



There isn't a lot of documentation on that parameter. I think the best solution would be to use the sncguru method for parsing URL parameters. You can find the link here.



http://www.servicenowguru.com/scripting/client-scripts-scripting/parse-url-parameters-client-script/



cheers,


Cameron


Yes, I've already implemented that solution on our instance in our own way and its worked out well, but I'm wondering how extensive this particular parameter is.


Did you find out any more about 'sysparm_processing_hint' ?


I am trying to update the request "short description" using the cart name when the cart is processed into a request.


rsanon
Tera Contributor

Hi Daniel,



How did you get it to work?



We have the same UI Action - Create Request



function createRequest() {


  var url = "catalog_home.do?sysparm_view=catalog_default&sysparm_processing_hint=setfield:request.parent="


url += g_form.getUniqueValue();


window.location.href= url;


}



Since the fuji release, the field "Request on behalf Of' on the catalog form" use to populate with the caller field. This is not happening anymore.




Any ideas?