Export Context Menu in List View

ChezAndrewI0898
Tera Contributor

Use Case:

I want to hide export context menu from my custom tables if the logged in user is not member of a specific group.

 

I have added this line in the Export Context menu Condition:

!ListProperties.isRelatedList() && !ListProperties.isRefList() && new TestSI().disableExport(ListProperties.getTable())

 

Script Include:

	disableExport: function(tableName) {
                var groupID = gs.getProperty('Allowed_GroupID');
		var tablesHidden = ['custom_table1', 'custom_table2', 'custom_table3', 'custom_table4', 'custom_table5'];
		if(tablesHidden.indexOf(tableName) != -1) {
			return gs.getUser().isMemberOf(groupID);
		} else {
			return true;
		}
	},

 

Currently its not working.

I have tried putting logs but after a time the logs are not showing even if i refresh the list view.

 

Need help.

Thanks.

 

6 REPLIES 6

@ChezAndrewI0898 

nope, since you overriden the OOTB global one, you will have only 1 which is yours

And in that you are adding the extra condition

If my response helped please mark it correct and close the thread so that it benefits future readers.

i did try this but i see 2 exports in my custom table list view.