Can we create copy incident similar to the copy change?

Sharique Azim
Mega Sage

Hi all,

We have seen the copy change ui button on the change_request table in SNOW which copies the record for future use.

My question is can we create a same for the incident table?If yes, what steps are required.

I have been referencing Configure ability to copy a change request   to better understand.

One of my biggest obstacle is to mimic the ChangeUtils() API to be used in the UI action.

Detail steps/codes would be highly appreciated.

Best regards,

Shariq

1 ACCEPTED SOLUTION

poyntzj
Kilo Sage

Use this as a basis


Re: Re: Can you clone/copy a change request?



I would refine that script a little these days by making the noCopy a property so you can edit that value and not he ui action itself.


Can get clever with the tables too if you want


View solution in original post

7 REPLIES 7

Hi Andrew,



I have an issue and wondering if you could help me with that. I have been working on the same functionality. To Copy the incident.



Problem is that once the user clicks on copy incident, the "form submission" takes place and it is asking for Additional Comments for Closed tickets. Now since ticket is closed, additional comments is not available.



If i use Client on UI action, i am not sure how to redirect to the new Incident created. It does show the Inc number, but it doesnt redirect to the new Incident created


I will create an example tommorow for the inc number redirect. Likewise I would add a condition to the additional comments business rule so that it doesn't get triggered when you use your copy UI action.  




That might mean adding a read only true/false field that gets marked true when your UI action is used. That could be used with the condition to keep the BR from being executed.  


Hey Andrew,


I was able to resolve it. I was using Server side scripts for redirection like an idiot when i was writing the UI action as Client side. I use window.location to set the URL and it is working fine now.