If there is nothing already in place, I would do the following:
- Create a UD code type of BU
- Add a UD Code (of type BU) for each ProdGrp.
Make the UD Code the same as the ProdCode (for easier relating).
Set the LongDescription to be a list of email addresses for that BU. Use a semicolon to separate addresses, like:
alice@abc.com; bob@abc.com; charlie@abc.com;
You may have to play with whether or not a trailing semicoln causes issues. And don’t try to include the display names like:
Alice Cooper<alice@abc.com>; Bob Seager<bob@abc.com>;
Then in your BPM, query the UD Codes like:
Db.UDCodes
.Where( r =>r.Company == callContextClient.CurrentCompany
&& r.CodeType == 'BU' && r.CodeID == PG)
.Select( r =>r.LongDesc)
.DefaultIfEmpty("your email address to catch faults").FirstOrDefault()