Create new record with specific view on UI Action?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2016 10:09 AM
Hello all,
I have created a new table that is on a related list and when it comes to creating new records on the related list, I woulld like to be able to do it two ways. One would be for a user to click on 'New' and go to the Default view. Another would be to click on a UI Action and have it go to the form with another view. I have tried creating the UI Action with a redirect to the table using 'action.setRedirectURL('table.do?sys_id=-1&sysparm_view=new_view') and it gives me an error of 'No records selected'.
I've looked on the forums and found suggestions when it came to switching views on already created records, but this would be for going to a brand new record with a forced view. Is there another way for me to do this? Thanks!
-Eric

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2016 10:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2016 11:01 AM
Hi Chuck,
One of the differences that I have on mind is that the UI Action is that 'List Banner Button' is checked and not 'Form Link' The UI Action is on a related list.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2016 12:41 PM
I was able to reproduce this from a related list with a List Banner button and List Link UI action.
There's a New button on the global table specifically for related lists. You may be able to adapt it to your needs (or make a copy of it and override.)
Change INSTANCE in the URL below to your instance name and take a look.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2016 05:42 AM
I don't know if this would be an issue as well, but the UI Action I have created to force the record to be in a specific view is in a scoped application