how to hide a UI action button from Service Portal which is OOTB in a widget

Amol Pawar
Tera Guru

Hi All,

I have used to OOTB widget by cloning to access table data in a portal view. I can access all table data in the list view and form view as well. But I got an OOTB 'Save' button on the form. I want to hide that save button only for one table.

AmolPawar_0-1697521323464.png

Any idea how can I hide this save button for a specific table?

 

Thanks in advance,

Amol.

1 ACCEPTED SOLUTION

Tai Vu
Kilo Patron
Kilo Patron

Hi @Amol Pawar 

That is OOTB button so it will be controlled by the canWrite() function. So you should review the Write ACLs that defined for the table (IPBNC). Then, redefine accordingly to make it invisible for your case.

 

From your screenshot, the button most probably comes from the below UI Action.

URL: <instance_name>/sys_ui_action.do?sys_id=42df02e20a0a0b340080e61b551f2909

You can test it by simply deactivate the button. If it's not the correct one, just inspect the form and see what is the sys_id from the button.

After that, you will be able to identify the conditions of the UI Action.

 

Let me know if it works for you.

 

Cheers,

Tai Vu

 

View solution in original post

6 REPLIES 6

Harish KM
Kilo Patron
Kilo Patron

Hi @Amol Pawar you can add the condition below using data.table which will give you the table name. the below would hide the save button to RITM form

 

<button ng-if="getPrimaryAction() && data.table != 'sc_req_item'" type="submit" ng-click="triggerUIAction(getPrimaryAction())" ng-disabled="submitting" class="btn btn-primary action-btn pull-right" gsft_id="{{::getPrimaryAction().sys_id ? getPrimaryAction().sys_id : ''}}">${Save} <span ng-if="saveButtonSuffix">(${{{saveButtonSuffix}}})</span></button>

Regards
Harish

Thank you @Harish KM ,

Thank you for your reply. I'll definitely try your solution as well.

Amol.