How to run "Populate primary resource attributes" from background script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I have to create a Action in flow designer, where I will be passing user sys_id. I want to trigger "Populate primary resource attributes".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
@Tejas Adhalrao , I'm aware of how to create actions. I want to understand what is getting triggered or updated specifically for " "Populate primary resource attributes" UI action.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi Dhathri,
If you are referring to the standard Resource Management function to sync a user's roles and group memberships to the Resource tables (so they appear correctly in the Resource Finder), the Script Include you are looking for is likely ResourceAssociationManager.
Here is how you can use it in your Flow Designer Action (Script Step):
(function execute(inputs, outputs) { var userID = inputs.user_sys_id; // Map this from your Action Input if (userID) { // This standard library updates the resource associations (groups, roles) for the user new ResourceAssociationManager().updateUserAssociations(userID); } })(inputs, outputs);
How to verify if this is the correct script: If "Populate primary resource attributes" is a specific UI Action (Button) you see on a form:
Right-click the button header or go to System Definition > UI Actions.
Search for the name "Populate primary resource attributes".
Open the record and look at the Script field. It will show you the exact API call used.
However, typically for Resource Management syncing, ResourceAssociationManager is the key class.
If this response helps you solve the issue, please mark it as Accepted Solution.
This helps the community grow and assists others in finding valid answers faster.
Best regards,
Brandão.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
