- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2015 01:51 AM
Hi,
I'm trying to get my head around how view rules work and when they are invoked.
I'm aware that there is a global business rule (called 'incident functions') that affects the form view that is presented when opening an incident to distinguish between ITIL and ESS views. But can anyone tell me:
- Are view rules invoked AFTER this global business rule (so they will override the business rule)?
- Are view rules supposed to come into play when a NEW incident is created (e.g. with the CREATE NEW module)?
- If a CREATE NEW module calls a URL that doesn't have a view parameter, which view will it display?
Too many questions, sorry, but I've been through the wiki and the forum to try an find this out.
Many thanks to anyone that can help,
regards,
Keiron.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2015 03:06 AM
Read this from WIki...Will help clarify the things more
Switching views submits the form, which saves all changes and triggers any onSubmit client scripts that apply. You cannot switch form views on a new form that has not been saved yet.
When a user switches views, the selected view is saved as a user preference so the user sees the same view by default when the form opens. When a user has a view saved as a user preference and then opens a URL to a record that specifies another view, the form displays in the view saved in the user preference, not the URL. For example, if a user selects the Mobile view on an Incident record and then tries to open the following link, which specifies the visual task board view, the form still opens in the Mobile view: https://{instance}/nav_to.do?uri=incident.do?sys_id={sys_ID}sysparm_view=vtb.
The sysparm_view parameter specifies the view to be used for a list or a form, and can be overwritten by a user's stored preference for a view. You can override this behavior by setting the sysparm_view_forced parameter to true.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2015 03:05 AM
Hi Keiron,
- Are view rules supposed to come into play when a NEW incident is created (e.g. with the CREATE NEW module)?
View Rules apply only to saved records and not unsaved ones. On unsaved ones the view is governed by the URL parameter or user preference
- If a CREATE NEW module calls a URL that doesn't have a view parameter, which view will it display?
if there is any user preference selected then that will show up , else default view
- Are view rules invoked AFTER this global business rule (so they will override the business rule)?
both are unrelated items, global BR and View Rules
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2015 03:06 AM
Read this from WIki...Will help clarify the things more
Switching views submits the form, which saves all changes and triggers any onSubmit client scripts that apply. You cannot switch form views on a new form that has not been saved yet.
When a user switches views, the selected view is saved as a user preference so the user sees the same view by default when the form opens. When a user has a view saved as a user preference and then opens a URL to a record that specifies another view, the form displays in the view saved in the user preference, not the URL. For example, if a user selects the Mobile view on an Incident record and then tries to open the following link, which specifies the visual task board view, the form still opens in the Mobile view: https://{instance}/nav_to.do?uri=incident.do?sys_id={sys_ID}sysparm_view=vtb.
The sysparm_view parameter specifies the view to be used for a list or a form, and can be overwritten by a user's stored preference for a view. You can override this behavior by setting the sysparm_view_forced parameter to true.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2015 03:10 AM
Many thanks for the quick reply Anurag.
That's cleared things up for me so I'll be able to proceed with my new form view(s).
regards,
Keiron.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-17-2015 07:07 AM
Hi Keiron, View Rule is use to "custom view with filter condition" which control the Form view or (List view). will not override the Global business rules.