Business Rule not working on Agent Workspace

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2019 02:54 AM
Hi All,
I was working on the Agent Workspace and I have the following issue:
The Business rules for the Incidents to set status based on the next step is not working as expected.
The next step function is defined in the custom table. The values are fetched from BR and Script Include.
Expected Behavior:
As shown in the attachment 'IncidentForm' - When the State is New - Next Step field show choices based defined on the status flow. Attachment - 'StatusFlowDefinition'
Behavior on Agent Workspace:
As shown in the attachment 'AgentWorkspaceView' - Next step field is displaying all the choices.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2019 05:41 AM
Is this in a business rule or client script? Could you post the code?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2019 10:49 PM
It's a BR, here is the script:
Condition: current.u_next_step.changes() && current.u_next_step != ''
var statusFlow = new global.StatusFlow(current);
var nextState = statusFlow.getNextState();
// this task object represents current
var thisTask = new Task(current);
// if we got an invalid state/step pair, inform the user
if (nextState == undefined) {
gs.addErrorMessage('Unable to determine the new state. This probably means the status flow for ' + current.getTableName() + ' is not properly configured.');
} else if (nextState != thisTask.getStatus()) {
// use thisTask (KSTask object) to set the state, so we know that all state and table-specific states are set
thisTask.setStatus(nextState);
}
// store the next step and reset
current.u_previous_step = current.u_next_step;
current.u_next_step = '';
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2019 03:10 AM
I am also facing the same issue that business rule defined on Incident is not working on agent workspace. Please suggest a solution if possible.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2021 08:48 AM
Hi Akshay/Akanksha,
Did you get to the bottom of it? I think it is onBefore business rules that doesn't work in Agent workspace. I have the same issue. Please can you post here if you found the solution.
Thanks
Ann