Intercepting the interceptor

shawnbaar
Giga Expert

Hello,

I have a requirement to intercept the OOB Create New Change interceptor.  Essentially, I need to ask which company is requesting the change prior to determining if it is a Normal, Standard, or Emergency change type.

I tried the obvious changing of URLs in a new interceptor to intercept the resulting URL of the OOB Change interceptor.  That doesn't work with the URL I copied out of the address bar when I am on the page that appears when the OOB Change interceptor is displayed.

Is there a different target URL I should be trying to target?  Or is there a better approach?  I have seen a couple of things from a few years ago about creating a record producer, but I am not very familiar with those yet.  Any advice is appreciated as I am still trying to determine my best options.

Thanks,

Shawn

1 ACCEPTED SOLUTION

shawnbaar
Giga Expert

Hello Sebastian,

Thanks for the reply.  I have been able to figure out how to accomplish what I need with the interceptor.  I created a new interceptor for change_request.do, leaving the target URL empty. 

Since this is part of an automated process, I then cloned the original Change Request interceptor, created new answers to dynamically assign the target URL for each new company.

I then set the next_question value in the new change_request.do interceptor to match the Question of the cloned Change Request interceptor and it brings up the question regarding "which company" before navigating to the "what type of change" wizard page.

Hope this helps someone in the future.

View solution in original post

5 REPLIES 5

sebastian_g_snc
ServiceNow Employee
ServiceNow Employee

Hi,

forget about intercepting an interceptor.

There should be a better way. So if you really need to know the company BEFORE the change type, I assume there is more to this, right? What does the company selection determine? Can you shed some light on that?

Otherwise I would say: choose the change type via interceptor and on the form you choose the company.?!

Oh one more thing: record producers are easy to use. have a look at the existing - good examples there.

Best,

Seb

shawnbaar
Giga Expert

Hello Sebastian,

Thanks for the reply.  I have been able to figure out how to accomplish what I need with the interceptor.  I created a new interceptor for change_request.do, leaving the target URL empty. 

Since this is part of an automated process, I then cloned the original Change Request interceptor, created new answers to dynamically assign the target URL for each new company.

I then set the next_question value in the new change_request.do interceptor to match the Question of the cloned Change Request interceptor and it brings up the question regarding "which company" before navigating to the "what type of change" wizard page.

Hope this helps someone in the future.

Wow, well done. I am amazed, that it works. Speaks for this platform ;D

Can the new interceptor first present the user with a list of change templates and, if a template is selected, that template can answer the Standard/Normal/Emergency question options?

Only if no template is selected as the first step when creating a new change would the user then get the Standard/Normal/Emergency question options.