- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2014 04:40 AM
Has anyone got around this issue...
A user adds multiple items to their cart in ESS - the 'Requested for' field for each item is set different (e.g. a PA logging two tickets for members in her team).
The REQ and all RITMs log with the 'Requested for' as the last customer to be set.
What we ideally need is for each item to take the relevant customer name and apply that to the 'Requested for' field in each RITM logged (and not just apply the name from the last item to all other items ordered).
We are not overly concerned with what name gets populated in the parent REQ record for the 'Requested for' - ideally, if there is one item in a REQ it would take the 'Requested for' name entered and if there are multiple items per order it would take the 'Opened by'.
The response from Hi is...
I understand your requirement here. But thats an expected behaviour. This is because the 'Requested For' field is on the 'sc_request' table. Whenever an user submits a cart with many catalog items, it always creates one Request and multiple Requested Items. So, there will only one 'Requested For' and so it takes the Requested For as the last person whom you add it as Requested For in the Cart. There is no alternative for this.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2014 05:52 AM
oopsy I should i mentioned it properly ...
current.yournewfield = current.variables.variableNameFromCatalog;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2014 06:07 AM
Hi Nat,
The current.field = current.variables.variablename should go into a before insert business rule on the sc_req_item table.
As for populating the variable, you can use a client script, but a better practice would be to put javascript:gs.getUserID() as the default value in your reference variable. That way the value will be set when the form loads and will be more efficient than a client script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2014 06:57 AM
Thanks Brad and Kalai, all sorted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2014 07:00 AM
Close off the loop and mark the appropriate response as answered .. Cheers !