Question on 'New' button on the 'Table' Form

cc11
Tera Contributor

Could somebody please help me figure how the 'New' button in the screenshot below was created & how its visibility is set?

I tried to look up 'Table' form's UI policies, Client Scripts, but I was unable to figure it out.

find_real_file.png

Fyi -

When I view my custom table, it shows the 'New' button.

However, when I view a table from a Global application — for example 'Embed Object' table , the button disappears.

Any help would be appreciated,

Regards,

Yogesh

1 ACCEPTED SOLUTION

antin_s
ServiceNow Employee
ServiceNow Employee

Hi Yogesh,



It comes from the OOB UI Macro -   'table_col_embedded_function'



Turn off the following property to false to hide the button.



ListProperties.setHasTopNavActionButtons(false);



Hope this helps. Mark the answer as correct/helpful based on impact.



Thanks


Antin


View solution in original post

17 REPLIES 17

cc11
Tera Contributor

Just want to add one thing-   I dont need that 'New' button to be visible always. I just want to know what is controlling its visibility because I want to mimic it for my custom app (at the moment it is not appearing on my custom app, so I am trying to understand what is controlling it)


antin_s
ServiceNow Employee
ServiceNow Employee

Following line controls the New button.



ListProperties.setHasTopNavActionButtons(false);  



Thanks


Antin


cc11
Tera Contributor

Thanks Antin,



That was very useful.


Let me read through the link & do some trial and errors and see what results I get.



Regards,


Yogesh