Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Why plan start and end date fields are editable post Authorize state?

sekarpdkt
Kilo Contributor

I am finding these two fields are editable till end. Ideally post authorized by CAB (mean in Scheduled / Implement / Review state), in case of normal change, these fields shall not be editable. Any reason why these are kept editable? I tested this in Istanbul instance. I can add UI-Policies etc, but want to know the reason behind it.

Thanks.

1 ACCEPTED SOLUTION

What we did:


1) created a UI Policy to make Planned Start & Planned End read-only if State is not New.



2) created a UI Action that:


- Returns the state back to New so Planned Dates can be changed. (Happy to provide the full script if you need it)



3) Modified oob Business rule named - SNC Approval - Reset conditions


- Business Rule will reset the workflow


Note: the business rule has lots of comments to explain how it works exactly.



For the Reset Condition we are using: if (current.state.changesTo("-5"))


so reset triggers when State changes back to New



Then we're using Option 2 in the BR:


new WorkflowApprovalUtils().reset(current, comment);


current.approval = 'not requested';


gs.addInfoMessage('Workflow has been reset since Planned Dates have been modified');



This should give you the basics


View solution in original post

10 REPLIES 10

sekarpdkt
Kilo Contributor

I had same issue. When I tried to push back that post approval, we shall not change the planned dates, but found that OOTB it was allowed. Now forced to do lots of customisation.