- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-19-2022 04:57 AM
I have a requested item that has a requested for variable. It's set to default to one certain user because no others are able to access this catalog item. The problem i'm having is the request summary screen is defaulting to ME after I submit the request, which is making the approvals go to my manager instead of the manager of the requested for in the variable.
I've set the default value of the variable to this specific user.
I've set the workflow approval to go to the requested_for.manager.
Here is the page I'm talking about.
Can anyone help with this?
Thanks,
Linda
Solved! Go to Solution.
- Labels:
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-19-2022 06:17 AM
Hi,
In screenshot it is referring the Requested for field in REQ table. If you want this to be populated with the value in Requested for variable then create a business rule on insert for Requested Item table with below code
(function executeRule(current, previous /*null when async*/) {
if (!JSUtil.nil(current.variables.requested_for)) {
var gr = current.request.getRefRecord();
if(gr.isValidRecord()) {
gr.requested_for = current.variables.requested_for;
gr.update();
}
}
})(current, previous);
Palani

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-19-2022 06:17 AM
Hi,
In screenshot it is referring the Requested for field in REQ table. If you want this to be populated with the value in Requested for variable then create a business rule on insert for Requested Item table with below code
(function executeRule(current, previous /*null when async*/) {
if (!JSUtil.nil(current.variables.requested_for)) {
var gr = current.request.getRefRecord();
if(gr.isValidRecord()) {
gr.requested_for = current.variables.requested_for;
gr.update();
}
}
})(current, previous);
Palani