New Button on Case Related List needs to be routed to Case Child table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2023 04:39 AM - edited 07-27-2023 04:40 AM
Hi Team,
In our system currently when we click under Customer Service -> All ,its showing list of all cases with URL ending as sn_customerservice_case_list.do.
Now the requirement is, we have child case table say "xyz" .Onclicking New Button in the list view, it should not route to "sn_customerservice_case" instead it should goto "xyz".This New button is OOTB.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2023 06:51 AM - edited 07-27-2023 06:55 AM
Hi @Community Alums,
This is easily achieved by 'overriding the UI Action'.
A few questions before proceeding with the below solution are:
- Why are we routing to the child case table from the parent 'Case' list?
- Do you need to use a custom table (Using your example 'xyz') or can you leverage the existing sn_customerservice_task table which naturally provides a child record Out Of the Box?
- You can edit the existing UI Action (aka the 'New' button) and leverage the view and/or role to route appropriately (as SN has implemented)?
To answer your specific question putting aside my questions:
Simply create a New 'UI Action' similar to the below screenshot which will override the existing 'New' button (UI Action)
Please note: You will need to edit the existing 'New' UI Action. This will be either:
1) Edit the existing script leveraging the role and/or view (As per SN's implementation)
2) Create a new UI Action (As below), however, you will need to edit the existing UI Action by inactivating it or editing the condition by which to display/show the button.
Please note - it is recommended that you apply conditions of when to show and who can access this button similar to the existing 'New' UI action.
For additional help/info on UI Actions, see this SN link and video from Chuck T:
- UI Action Video with Chuck T
So as to help others in the community, please mark my answer as correct and/or helpful.
Thanks,
Robbie