Donot close change request unless all change tasks are closed?

Deepika61
Tera Contributor

Hi all,

We have requirement that "Donot close change request unless all change tasks are closed", So for that there is OOTB business rule "Check open change_tasks", So it abort the operation and throw an error message,

But here my concern was like, when i click on close ui action  before closing tasks, then it will throw a error message but the state was moved to "closed",. because of that customers are thought that it was closed.

So is there any way that if we click close button before close the tasks , it wil, throw error and state will back to previous state value?

Please help me on this 

Thanks

Deepika

10 REPLIES 10

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

so why not update the UI action condition and show the button only when all change tasks are closed?

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hi @Ankur Bawiskar 

Thanks for the response,

If i do that way like visble only when tasks are closed, from the customer side they may get confuse why the button was not visible according to the flow, and also All the users may not aware  that need to close all the taks to visble the close button 

So for that reason they want to go with the error message then they will get the point and close the task

So Can you please provide the solution as per my concern  that would helpful to complete the customer requirement?

Thanks

Deepika

Hi,

you can provide user training on the UI action visibility.

Showing the button and then running the validation and showing error is not good user experience.

when you click UI action and validation fails; you can use action.setRedirectURL(current) so that it stays on the form itself.

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hi @Ankur Bawiskar 

ok, Then what is the best practice to achieve this?

Please provide the solution with sample script

Thanks

Deepika