Related list 'New' button - "No records selected"

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-18-2023 01:08 PM
I have a couple of custom tables. The parent table has a related list showing all related tasks on the child table.
The 'New' button that shows by default (global table) was giving me an 'Action not authorized' message when clicked. After researching this, I determined that I needed to change the action name to eliminate that error. So I copied the existing 'New' ui action, restricted it to my custom table, and gave it a new action name. Then I updated the conditions on the old 'New' ui action so that it no longer showed for my custom table.
The new 'New' button works BUT only if I select an existing record from the list first. If I don't do that, I get a message 'No records selected'.
What do I need to do to make that go away?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-18-2023 01:36 PM
Hello,
Not sure what could be happening here, couple things to check though on the UI Action make sure there's no client side script executing. Also, on the UI Action make sure the Client checkbox is not checked.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2023 09:17 AM
Thank you. Client is not checked. Here is the script:
var uri = action.getGlideURI();
var path = uri.getFileFromPath() + '';
path = path.substring(0, path.length - 5) + '.do';
uri.set('sys_id', '-1');
path = checkWizard(uri, path);
if (path)
action.setRedirectURL(uri.toString(path));
action.setNoPop(true);
function checkWizard(uri, path) {
var already = uri.get('WIZARD:action');
if (already == 'follow')
return null;
var wizID = new GlideappWizardIntercept(path).get();
if (!wizID)
return path;
uri.set('sysparm_parent', wizID);
uri.deleteParmameter('sysparm_referring_url');
uri.deleteMatchingParameter('sysparm_list_');
uri.deleteMatchingParameter('sysparm_record_');
uri.deleteParmameter('sys_is_list');
uri.deleteParmameter('sys_is_related_list');
uri.deleteParmameter('sys_submitted');
uri.deleteParmameter('sysparm_checked_items');
uri.deleteParmameter('sysparm_ref_list_query');
uri.deleteParmameter('sysparm_current_row');
uri.set('sysparm_referring_url', uri.toString());
uri.deleteMatchingParameter('fancy.');
uri.deleteMatchingParameter('sys_rownum');
uri.deleteMatchingParameter('sysparm_encoded');
uri.deleteMatchingParameter('sysparm_query_encoded');
uri.deleteParmameter('sysparm_refer');
return 'wizard_view.do';
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2023 10:02 AM
That script looks like when the NEW button is clicked it will launch either a Wizard or an Interceptor page, is that what is supposed to be happening?