The following script is to create the Involved party from using the script. (Flow action script):
(function execute(inputs, outputs) {
var result = '';
var grSHEIP = new GlideRecord('sn_hr_er_involved_party');
grSHEIP.initialize();
grSHEIP.hr_case = inputs.HRCase; //HR ER Case
grSHEIP.type = inputs.Type; //Witness/Subject/Complainant/Other
grSHEIP.not_in_system = inputs.NotInSystem; //Internal/External
grSHEIP.name = inputs.Name; //External User
grSHEIP.user = inputs.User; //Internal User
//grSHEIP.autoSysFields(false);
grSHEIP.setWorkflow(false);
result = grSHEIP.insert();
outputs.recresult = result;
})(inputs, outputs);