UI Builder: "Link To Destination" and "NAV_ITEM_SELECTED" Events Not Working for New Records.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-22-2024 10:12 PM - edited ‎12-22-2024 10:58 PM
Description:
I am working on a UI Builder page where I need to redirect users from a subpage (e.g., "kb_view") back to the record page (e.g., "incident") when a specific action occurs. This works for existing records but not for new records where the sys_id is in the format "-1_u_1".
What I Tried:
- Using "Link To Destination":
Attempted to configure navigation via "Link To Destination," but it does not work for new records. - Using the NAV_ITEM_SELECTED Event:
Below is the script I used:
const redirectPayload = { - redirect: true,
- route: "record",
- fields: {
- table: "incident",
- sysId: api.state.parentTabRecordId, // sys_id of the new record
- },
- };
- // Emit navigation event to redirect the user to the incident record
- api.emit("NAV_ITEM_SELECTED", redirectPayload);
Unfortunately, this also does not work for new records.
Goal:
I need a reliable way to redirect users from the "kb_view" subpage back to the "record" page, regardless of whether the sys_id belongs to an existing record or a new record (e.g., "-1_u_1").
Questions:
- Is there a specific configuration or workaround to handle navigation for new records in UI Builder?
- Does NAV_ITEM_SELECTED support this use case, and if not, what alternative approach should I use?
- How can I ensure compatibility for both existing and new records when using navigation events in UX client scripts?
Any insights or suggestions would be greatly appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2025 02:22 AM
Can we set up client-side communication between the record page and the KB sub-page, such that we can manipulate the field values on the record page from a button event on the KB page?
Here is the reference URL:
now/sow/record/incident/33ed5194fc8256d85dcff689977724a0/sub/kb_view/kb_knowledge/f1f728b28581da5450c042e7ef7bae14
We aim to update the fields on the record page from the knowledge page. Is there any way to achieve this functionality?