- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-08-2021 04:31 AM
Hi,
We have a requirement to apply reference qualifier for a reference field based on for form view. We have 2 views for location table say A & B. The reference qualifier specified on the Dictionary entry should be applicable only for view A and not on B.
Tried using 'gs.action.getGlideURI().getMap().get('sysparm_view')' to check the view. But this is always returning sys_ref_list which is the view of reference popup list.
Is there a way to get the view name of base form and apply reference qualifier accordingly.
Regards,
Thenmozhi
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-08-2021 05:12 AM
Hi,
whenever you open reference field the URL always include the form view from where it got opened in this parameter -> sysparm_form_view
Below is the URL I got when I clicked the Assignment group field being on CHG Default view
https://instanceName.service-now.com/sys_user_group_list.do?sysparm_target=change_request.assignment_group&sysparm_target_value=&sysparm_reference_value=&sysparm_nameofstack=reflist&sysparm_clear_stack=true&sysparm_element=assignment_group&sysparm_reference=sys_user_group&sysparm_view=sys_ref_list&sysparm_form_view=default&sysparm_additional_qual=&sysparm_domain_restore=false
When I changed to emergency view the URL included that as well
https://instanceName.service-now.com/sys_user_group_list.do?sysparm_target=change_request.assignment_group&sysparm_target_value=&sysparm_reference_value=&sysparm_nameofstack=reflist&sysparm_clear_stack=true&sysparm_element=assignment_group&sysparm_reference=sys_user_group&sysparm_view=sys_ref_list&sysparm_form_view=emergencyChange&sysparm_additional_qual=&sysparm_domain_restore=false
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-08-2021 06:07 AM
Hi,
I checked in my PDI which is in Quebec
I believe it should work in paris as well
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-14-2021 05:49 AM
I agree the parameter does not exist. sysparm_view=sys_ref_list does, but sysparm_form_view does not.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-25-2023 03:57 AM
Hi @Thenmozhi , did you find the solution? How did you achieve this?