When on-edit (or on-demand) fires from UI, I want to control the banner that is displayed to the user, like validation scripts.
Scenario: user expected on-edit to do something.
However the script detected a problem, and could not proceed. It sets a message field, but the user did not notice this.
Currently, the banner is GREEN. The user assumes the trigger ran OK, but actually nothing happened.
I want to give feedback to the user:
- RED – like current error behaviour, but specify a message string (item not saved)
- ORANGE – Script completed but “some message”.
- GREEN – Script completed and “here is a message”.
Suggestion:
var messages = [];
messages.RED = 'Some error message';
//messages.ORANGE = 'Some warning message';
//messages.GREEN = 'Some OK message';
returnValue(messages);
Nothing returned = current behaviour, for backwards compatibility.