Loading...
Loading...
When a custom declarative action is configured with the action model set to "Playbook Card" in order to display a button on a Playbook activity, the expected behavior after disaplying an error is as follows: Prior to the Zurich release, if the UI Action invoked by the declarative action displayed an error message, the error was displayed to the user, and the underlying activity was not marked as complete. This allowed the user to address the issue before proceeding. As of the Zurich release, this behavior has changed. When the UI Action returns an error message, the error is displayed to the user; however, the activity is also marked as complete. This represents a change in the expected workflow, as the activity now progresses regardless of whether the error condition has been resolved.
Prerequisite steps(configuration): 1. Create a ui action(sys_ui_action) with the following field values, Workspace Form Button - true Format for Configurable Workspace - true script - (function executeUIAction() { gs.info("test ui action triggered"); var assignTo = current.getValue('assigned_to'); if (!assignTo) { // current.description = "updated description"; // current.update(); gs.addErrorMessage('Assigned to is required in order to move forward with the next activity.'); } if (assignTo) { //current.status = 'closed_complete'; current.update(); } //action.setRedirectURL(current); })(); active - true show update - true table - incident name - Continue **Do not use** action name - continue 2. Create a action assignment(sys_declarative_action_assignment) referring to the following record, action label - Save and Complete action name - save_and_complete implemented as - client action render mode - button button type - primary button position - right table - incident form field required - true specify client action - create a new record(Complete Activity Custom) following step 3 and select it in this field 3. While creating the action assignment record also create a action payload definition record referring to the following record, key - PLAYBOOK#COMPLETE_ACTIVITY_CONTEXT label - Complete Activity Custom applicable to -Playbook Card application - global payload - { "contextId": "{{contextId}}", "uiActionName": "continue" } 4. Now navigate to user form activity definition record in sys_pd_activity_definition and navigate to related list playbook action and create a new record linking the action assignment created to this activity. 5. Create a playbook with just 1 stage and add user form activity and configure it to display a few fields, make sure assigned to is one of them. 6. Perform these steps 1 to 5 in a Zurich patch 5 and above instance and also in a yokohama instance. Steps to reproduce the issue post configuration: a. Login to the zurich instance b. Navigate to workflow studio and open playbook created. c. Test the playbook against any open incident. d. Clear the assigned to value on the activity and hit "Save and Complete" e. Note that the error message thrown from the UI action is displayed but the activity is also marked as complete f. Now login to yokohama instance g. Perform same steps from b to d. h. Now notice that the error message is displayed but the activity would not get marked as complete
Two viable workarounds while customers wait for the patch: a. Override the activity UI to use the legacy PlaybookForm renderer. Configure an Activity Override on the affected Playbook Experience to use PlaybookForm instead of the new Form Controller. This is a configuration-only change, no code modifications needed, and applies per Playbook Experience. b. Make the validated field mandatory at the dictionary level (sys_dictionary → mandatory = true). Form-level validation runs before the UI Action and routes through the FORM_VALIDATE_FAILED path, which correctly leaves the activity in its prior state. Best when the field is unconditionally required on every form using that table — accept that this changes behavior beyond the playbook context.
PRB2007586
Click on a version to see all relevant bugs
ServiceNow Integration
Learn more about where this data comes from
BugZero Plan
Streamline upgrades with automated vendor bug scrubs
BugZero Prevent
Wish you caught this bug sooner? Get proactive today.