How to FORCE a UI View in a module

Katie A
Mega Guru

We have a module on Change > Create New.

I would like to FORCE that module to ALWAYS open the create new form with the default view.

I edited the Application Menu and added the name of the view.

However, it does not work! If the user has another view (such as the approval view) open prior to clicking Create New, it stays with the previous view and does NOT force the default view.

I also tried sysparm_view=default

That did not work either.

How to force the view every time the module is open?

Screen Shot 2016-03-10 at 4.02.22 PM.png

22 REPLIES 22

Can you state the details of your issue? Which modules are work for whom and when? What is the desired behavior? There are several things at play here include view rules, a potential script, and even the module definition itself.


Sure



Screen Shot 2017-04-13 at 14.27.25.png



so '&sysparm_view_forced=true' is the attribute needed to force the view that the new record module uses.   In my case i want to use the default view which is why there is no view name after '&sysparm_view='



Hope this makes it clearer.   Mark as helpful if so.


fuzum
Kilo Contributor

Thank you for your quick answer! I need to force the view for the security incident table (sn_si_incident). I need to force it when the user is creating or open a existing record.


Can you tell me, which parts do I have to adapt.



sn_si_incident.do?sys_id=-1&sysparm_query=active=true&sysparm_view=&sysparm_view_forced=true



Thank you very much for your help


Hi,



If it's just a "new record" thing, have you considered using a Record Producer to create a better user experience? You can use real questions instead of field labels, you can provide help in those fields, and you can easily limit the number of fields (or variables) on the screen. For an example, see "Create a new issue" record producer that creates an incident. End users are not exposed to the standard form with buttons, etc. Very clean.



http://wiki.servicenow.com/index.php?title=Record_Producer


Hi Chuck,


the problem is, when ever I try to open a existing record with any other user except admin, the security itil view opens up. I need the customized view to open up.


I have tried:


- User preference


- View Rules


- Restriced Form Scripts


- also changed the role for the security itil view to admin, still gets open by non-admin users


I don't know where to look else