Custom Additional Field Called in Subject Line via Custom Script

Custom Additional Field Called in Subject Line via Custom Script

Good day SDP Community, 

I am, as the subject line implies, trying to create a custom script in SDP Cloud that calls two additional field variables and inserts them into the subject line, depending on whether or not the employee is being onboarded or offboarded. 

The Additional Fields are: 
Depending on Form Rule Flow only 1 of these two variables will be present in the submitted form.

"Employee Being Offboarded" = UDF_REF10
"Employee's Full Name" = UDF_CHAR129

So far for the offboarding script I have the following:

/*Set subject line for HR Offboarding Form*/
var subtext="HR // Confidential";
var user=await CS.getValue("udf_fields.udf_ref10");
if(user !=null){
var subject_text= subtext + user; 
CS.setValue("subject",subject_text);
}
CS.end();

Currently the Script Executes and Returns a subject line of "HR // Confidentialobject Object"

//*Additionally, I will need one for Onboarding (UDF_CHAR129) as well. 

However, when trying to execute this I get a complex alphanumeric error from SDP. 

I am brand new to Custom Scripting in SDP and would love the opportunity to learn more about this but also really just need to get this working for our performance improvement rollout to our SDP Tool. 

I appreciate any and all assistance greatly! *//

                  New to ADSelfService Plus?