- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2025 03:27 AM
Hi Team,
I have created on catalog item, that item contains the MRVS, inside the MRVS we have the approver's values. i am sending the approvals by using the Flow designer, for MRVS to get one by one approval i used FOR EACH Logic ,the approval records created but I WANT TO CRATE THE ALL APPROVAL RECORDS AT A TIME.
Ex: MRVS contains the 5 records now we have 5 approvers i need to create 5 approvals records same time.
If any one knows could pls help on this
Advance thanks Team
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2025 03:12 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2025 09:03 AM
Enhanced Solution: Pull Company Record for Each Approver
Since each approver is associated with a company, you need to:
Retrieve the list of approvers from the MRVS.
Fetch the company record for each approver.
Create approval records with company details.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2025 08:42 AM
Actually Its not creating one after one. The 2nd is waiting for the first approval response once it is full filled then only its going to create 2nd approval. That's what the issue for me?
As you said time difference is not a matter but its waiting for first approval response to create 2nd approval that's where I am struggling.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2025 09:07 AM
Enhanced Solution: Pull Company Record for Each Approver
Since each approver is associated with a company, you need to:
Retrieve the list of approvers from the MRVS.
Fetch the company record for each approver.
Create approval records with company details.
var approverList = [];
var gr = new GlideRecord('sc_multi_row_variable_set'); // Update with your actual MRVS table
gr.addQuery('request_item', current.sys_id);
gr.query();
while (gr.next()) {
var approverData = {};
approverData.approver = gr.getValue('approver'); // Assuming 'approver' field exists
approverData.company = getCompanyForUser(approverData.approver); // Fetch company
approverList.push(approverData);
}
// Function to get the company for a user
function getCompanyForUser(userId) {
var userRec = new GlideRecord('sys_user');
if (userRec.get(userId)) {
return userRec.getValue('company'); // 'company' field should reference the Company table
}
return '';
}
The script retrieves each approver's details and fetches their company record.
The company field is extracted from the sys_user table.
2. Store the Approver List in a Flow Variable
Save the approverList array as a variable in Flow Designer.
This will be used in the next step to create approval records dynamically.
3. Create Approval Records Including Company Info
Use "Create Record" action inside Flow Designer.
Table: sysapproval_approver
Set Fields:
Approver: approverData.approver
Company: approverData.company
State: Pending
Source Table: Requested Item (sc_req_item)
Source Record: current.sys_id
And another add on maybe
Alternative: Use Flow Designer’s "Ask for Approval" with Company Data
If using Flow Designer without scripting:
Add an Action → Use "Lookup Records" on sys_user table.
Match approver email/ID with the user record.
Extract the company field and store it as a variable.
Pass the variable when creating approval records.
Final Outcome
✅ All approvals are submitted at the same time (parallel processing).
✅ Each approver's company is automatically included in the approval record.
✅ Eliminates need for a sequential For Each loop, improving efficiency.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2025 02:14 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2025 01:25 PM
Is the Wait checkbox checked on the Ask for Approval? You may need to un-check that.