Add requested for to service catalog

will_smith
Mega Guru

My client is wanting to add the Requested For (requested_for) field to some catalog items. I know how to add the reference field to the user record and populate the default value with the current user. What I am having some trouble with is then getting that field to show up in the cart's order status page as well as reflecting on the REQ/RITM - the field is already added to the form, it's just not updating with the catalog item information. I am definitely going to need some help with this, as I've not edited the cart before.

Below are the steps I have taken so far...

  1. I've added Requested For (requested_for) to my test catalog item form.
  2. Add requested for to the order status page. I was able to complete that with this cart widget macro: Create macros for cart layout example. Order Status_ REQ0016234 _ WESCODEV - ServiceNOW_06-03.png
  3. I've looked at this community article on populating the Request with the catalog item variable, but have yet to implement it successfully. How do I add a requested for field on a request form in a service catalog?

To sum up, what I'm needing help with is taking the requested for variable from the catalog item and pushing it to the cart order status page, and the request/requested item(s) that gets created.


Thank you for your help!

1 ACCEPTED SOLUTION

HugoFirst
Kilo Sage

That is an excellent question William!         I suppose you are referring to a situation where each requested item may have a different person in the requested_for field.   If this is the case, then the request record by itself is not adequate to reflect that situation, as it's "requested_for" field can only handle a single value.



Here's my ideas for this situation:


1. On your catalog item, add a field for "Requested For".


2. On the requested_item form, add the "Variable Editor".   All variables on the catalog item will now display on your requested item record.



find_real_file.png



Give you something like this on your requested item record:


find_real_file.png


View solution in original post

18 REPLIES 18

bhushan11
Tera Contributor

Go to   1. maintain cart layout,



2. Cart preview 2 step ,



in these you will have button ---"Requested for"


will_smith
Mega Guru

Requested For is already checked.


will_smith
Mega Guru

I'm also needing a way to copy the Requested for from the Request to the Requested Item. I did get #3 to work, and copy the requested_for field to the request, but am now working on getting it into the requested item as well.


in Requestitem   form layout : request.requested_for