Task Object – Conditional Field Updateability (On Edit Script not working dynamically)
At Mobile Application Setup (at CX Sales Mobile Scripts), I am trying to make the custom field Reject Division (PRTFixChoiceListField_02_c
) editable only when the vanilla field Outcome has the value 'REJECTION'.
I have added the following script under On Edit (Server Script) for the Task object:
const taskRow = getCurrentRow();
const outcome = taskRow.OutcomeCode;
taskRow.setColumnUpdatable('PRTFixChoiceListField_02_c', outcome === 'REJECTION');
However, the field always remains read-only, in both cases.
It seems that the process is not happening on the fly (when the Outcome is changed in the Μobile UI). The Reject Division field does not dynamically switch between editable and read-only in that moment.