Setting the Involved Party Type from the Report Misconduct Record Producer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2023 10:53 AM
Hello!
We are in the early stages of implementing the HR Employee Relations scoped application and we are on Utah. One of the requirements is related to the Report Misconduct record producer and enhancing the translation of the "Please list the employees who were involved" to the Involved Parties related list. The requirement is to allow the Requester to select the "Type" when adding users to the list and then have the involved party related list updated with the User and the "Type". Out of the box, it is just the User and the Type is set to "Other".
I am able to add another question to the variable set and display it on the record producer to allow the Requester to select the "Type" for the user. However, when the form is submitted the User is added with the Type of 'Other'.
I found the BR that adds the Opened for to the Involved Party and sets the Type to "Complainant". I looked at the Templates, Flows, and other BR's but cannot find what adds the users from this Variable to the Involved Party related list.
Is what I am trying to accomplish even possible, and if so, how?
Any guidance would be greatly appreciated.
Thank you in advance!
Jeremy
- Labels:
-
Human Resources Service Delivery
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2023 12:28 PM
Update to my above question. In the record producer for "Report Misconduct" I see that it is calling the 'er_Producer' script include. Within that Script include, it is calling the 'er_ProducerBase' script include which has the following lines of code which answers part of my question. The other part of my question is answered by the fact that the Script include is read-only based on its protection policy.
// Look for multi row table in catalog item with 'involved_user' variables
for (var i = 0; i < relevantVariables.length; i++) {
var variable = relevantVariables[i];
if (variable.type == 'sc_multi_row') {
var multiVarArray = JSON.parse(producer[variable.name]);
for (var j = 0; j < multiVarArray.length; j++) {
var dataObj = multiVarArray[j];
if (dataObj.hasOwnProperty('involved_user') && !seenUsers.hasOwnProperty(dataObj['involved_user'])) {
var userId = dataObj['involved_user'];
seenUsers[userId] = true;
var grParty = new GlideRecord('sn_hr_er_involved_party');
grParty.setValue('hr_case', current.getUniqueValue());
grParty.setValue('user', userId);
grParty.setValue('type', 'other');
grParty.setWorkflow(false);
grParty.insert();
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2024 10:53 PM
Hi @JeremyHoffman - So how did you handle this requirement? Were you able to map the involved parties correctly? or did you leave it to OOB default value "Other"?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2024 04:15 AM
Hi @Mandeep Kaur1 We ended up leaving it as out of the box value of "Other". They weren't thrilled but accepted it as the path forward in hopes that we can configure it in the future.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2024 09:16 AM
Hi Jeremy,
Interesting requirement, I have not worked with ER Cases but will do so in coming weeks.
Going through your requirement, I was thinking of a connecting RP submission to a Flow that has a Get Variables step that gets all values from the submitted RP and then goes in the Involved Party table to create or modify what's there.
Would that solve your issue ?
Regards