Oncell edit client script is working in List view but not in SOW

sharmaprash
Tera Contributor

Hello Everyone
We are facing an issue in which the oncell edit client script is working in native UI but not in SOW.
We have made description field mandatory so that on list view if someone tries to save it as blank they get a message as below. But this is not being on SOW list view. I have also tried making on celledit client script UI type to all.
On some portals it was mentioned to use Data policy but that will not be feasible I think as if in future incidents come from integration or if end user send it from employee where description field isn't there so this may be an issue. so I wanted UI configuration only.
Has anyone faced such issue? Do you have any suggestion as to what we should do in this case.

5 REPLIES 5

pr8172510
Tera Guru

Hi @sharmaprash, ,

I was able to achieve this requirement using a Before Update Business Rule on the Incident table instead of an onCellEdit Client Script.

Since onCellEdit Client Scripts are not supported in Service Operations Workspace (SOW), I implemented the validation on the server side:

(function executeRule(current, previous /*null when async*/) {

	// Add your code here
	if (gs.isInteractive()) {

        if (gs.nil(current.description)) {

            gs.addErrorMessage('Description is mandatory and cannot be left blank.');

            current.setAbortAction(true);
        }
    }

})(current, previous);

 

This solution is working successfully in both:

  •  Native UI List View
  •  Service Operations Workspace (SOW) List View

pr8172510_0-1781181448586.pngpr8172510_1-1781181511615.pngpr8172510_2-1781181546199.png

pr8172510_3-1781181567789.png