View based on URL/URI

gaidem
ServiceNow Employee
ServiceNow Employee

I have been struggling to implement a solution for dynamically loading views for Incident records. The qualifier is basically the URI/URL.

New Records
View: New

Existing Records+After clicking save on a new record
View: Default

Within the CMS
View: ess

Any suggestions on how to accomplish this?

6 REPLIES 6

gaidem
ServiceNow Employee
ServiceNow Employee

I put in a simple fix. I specify the new view from the create new module, and specify the view in the CMS links, this hasn't changed. The real issue was have the default view come up after saving a new ticket.

So I created an on submit client script:



function onSubmit() {
//Type appropriate comment here, and begin script below
switchView('section','incident','');
}


gaidem
ServiceNow Employee
ServiceNow Employee

Ok I take that back. That completely broke the UI actions. Save was submitting and the header buttons didn't work at all..

Back to the drawing board..