Operational Resource Plan is unable to be submitted. Getting onSubmit script error: TypeError: Cannot read property 'active' of undefined: function () { [native code] }


Description

Operational Resource Plan is unable to be submitted. Getting onSubmit script error: TypeError: Cannot read property 'active' of undefined: function () { [native code] }

Resolution

This was happening because the related Client Script has an If-Statement that uses the 'plan_type' field which will check for the value 'operational_work'.
With the way the g_form API works, in order to retrieve the value, the field must be on the form itself.

Currently, the Plan Type it is not on the form so the following If-Statement fails:

if (g_form.getValue('plan_type') == 'operational_work') {
return true;
}

Once we add it back to the form everything works properly. Additionally, the field will be hidden from the "Hide Plan Type" UI Policy so adding it will not interfere with your current form setup.
To do so, follow the steps below.

NEXT STEPS:

1. Navigate to Resource > Resource Plans > Create New Operational Plan
2. Right-click the Form Header and go to Configure > Form Layout
3. Find and add the "Plan Type" field
4. Save
5. Now you should be able to submit the Operational Resource Plan