Make re-open the chance_request record when state is closed

PRADEEPS2651093
Kilo Contributor

I have to make reopen the change request record when state is closed.

The change request record state closed to all other states how can I achive this?

can any one help me on this query

2 REPLIES 2

Dr Atul G- LNG
Tera Patron
Tera Patron

 Hi @PRADEEPS2651093 

 

Similar question under this thread

 

https://www.servicenow.com/community/developer-forum/make-re-open-the-chance-request-record-when-sta...

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Maddysunil
Kilo Sage

@PRADEEPS2651093 

You can create a UI action:

 

 var gr = new GlideRecord('change_request');
    if (gr.get(current.getValue('sys_id'))) {
        gr.state = '1'; // Assuming '1' is the code for "Draft" state
        gr.update();
        gs.addInfoMessage('Change Request reopened successfully.');
        action.setRedirectURL(current);
    } else {
        gs.addErrorMessage('Failed to reopen Change Request.');
    }

 

Please Mark Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.

 

Thanks