- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi All,
I need to auto populate Assignment group in "asset reclamation task" based on the Requested for location managed by group.
This asset reclamation request are raised from a record producer.
Can some one help me to understand on how to implement this requirement.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Hi @Arun Priya ,
There are two ways to achieve this
1) You can created after insert BR for the "asset reclamation task" and then check for the requested by location and based on that you can populate the assignment group.
Script:
(function executeRule(current, previous /*null when async*/) {
// Get Requested For user's location
var requestedFor = current.u_requested_for; // Replace with your actual field
var userGR = new GlideRecord('sys_user');
if (userGR.get(requestedFor)) {
var locationSysId = userGR.location; // Reference field
// Look up group managing this location
var locationGR = new GlideRecord('cmn_location');
if (locationGR.get(locationSysId)) {
var managedByGroup = locationGR.u_managed_by_group; // Replace with your actual field name
if (managedByGroup) {
current.assignment_group = managedByGroup;
}
}
}
})(current, previous);
2) You can use On submit catalog client script with similar logic.
After submitting the record it will auto set the field with the group
If this helped to answer your query, please mark it helpful & accept the solution.
Thanks
Siddhesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Arun Priya , For auto populating fields...Assignment Rules are a great approach. They allow you to auto populate your desired field along with giving you the leverage of deciding the conditions for auto assignment.
Let me know if you need more help over this and please mark this as helpful it came in use.
Thanks.
Yuvraj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Could you please let me know how I can autopopulate assignment based on the requested_for.location.managed_by_group in asset reclamation task.
Can you let me know the steps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Arun Priya , You can do this by following the below steps :-
1.Navigate to ALL-> Routing and Assignment->Assignment Rule
2. Click New.
3. Fill the form accordingly [ eg :- Name - Auto Populate Assignment , Order - 100 , etc.]
4.Open the Condition Filter and search for "Requested for" Related field.
5. Click that field and then search for "Location" Related Field.
6. Similarly click on that and search for "managed_by_group" field.
7. Then in the "Assign To" Related List choose which group you want to auto Populate for it. [eg : ACME Support].
8. Save the form and test it out.
I have attached some screenshots for your reference.
Let me know if you need any further help regarding this. Please mark it as helpful if i were able to solve your issue.
Thanks.
Yuvraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Assign to has list of group, it varies based on the requested for --> location --> managed by group