Issue Summary :

Custom fields : u_caller and u_vpn_contact_name is not getting filled on sc_task form
=> Desired Behavior________
Fields : u_caller and u_vpn_contact_name should get filled with requested_for value
=> Unexpected/Actual Behavior______________
Fields : u_caller and u_vpn_contact_name are empty

Cause :

Improper assignment in the workflow script for the affected fields


1. Fields : u_caller and u_vpn_contact_name are getting values from catalog task activity.
2. Catalog task activity is using a script to assign the values :
task.u_vpn_contact_name = current.variable_pool.Requestedfor.getDisplayValue();
task.u_caller = current.variable_pool.Requestedfor.getDisplayValue();
Instead of this, this is how call should be done:
task.u_vpn_contact_name = current.variable_pool.Requestedfor;
task.u_caller = current.variable_pool.Requestedfor;
=> Reason :
getDisplayValue() function makes this call for a string type field but u_caller and u_vpn_contact_name are user reference fields.
This is throwing an error in the logs :
org.mozilla.javascript.EcmaError: "u_caller" is not defined.
=> Fix
Removing the function call : getDisplayValue() makes it work

Article Information

Last Updated:2019-05-21 11:45:05