Event Handler - Create new Record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2023 12:55 PM
Hi,
I'm new to the UI builder, I have New button when clicked I want it to create a new record and bring me to the form.
when clicked
is returning
function handler({api, event, helpers, imports}) {
api.emit('NAV_ITEM_SELECTED', {
"route": "https://instance.service-now.com/now/appenginestudio/my-apps/ab8919792f98211077fa59a72799b6f6",
"fields": {
table: "x_964096_my_test_1_testtable1",
sysId: "-1",
},
});
}
What am I doing wrong?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2023 07:41 AM
Hi,
the route must be name of one of your pages where you have your reord to be displayed (probably "record" page in your example), not a full url.
Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2023 07:43 AM
Hi,
the route should be name of one of your pages/routes where the record form is implemented) generally, the "record" page is created for such purposes.
Change it this way and it will work.
Jan