Populate region based on le group
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2024 07:12 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2024 07:21 AM
Hi @Community Alums
First, we need to identify the relationship between the group and the location. Based on this analysis, we can either write code or utilize the AutoPopulate functionality to retrieve the appropriate location.
Thanks
Esh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2024 07:50 AM
Region & Le group are from u_core_request.both have variable & field in table & record producer.I need a reference qualifier for this one
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2024 07:29 AM
sys_user_grmember contains the group users for all groups. sys_user had a reference field named 'cost_center' for the 'cmn_cost_center' table, which has a reference field named 'location' for the 'cmn_location' table. Anyway, I got a Dynamic Filter Option defined for that.
for the field's definition, I have the Reference defined as:
And the a script include with logic based on the value of the table's Group field.
Script logic will depend on how you get location values from a group value.
var groupLocations = Class.create();
groupLocations.prototype = Object.extendsObject(AbstractAjaxProcessor, {
initialize: function() {
},
getGroupLocations: function (curRecord) {
var groupID = curRecord.u_group; // 'u_group' is custom reference field for sys_user_group
var locations = [];
// Logic to load an array of sys_id value of the desired cmn_location records
gs.info("getGroupLocations: list = " + locations.toString());
return 'sys_idIN' + locations.toString();
},
type: 'groupLocations'
});