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

PravinHirekudi
Tera Contributor

Find this in the HTML part of your widget and comment it that solves your problem. but how are u gonna save the form.do you have any other save/update button?

 

<button ng-if="getPrimaryAction()" 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> 

Hi @PravinHirekudi ,

Thank you for your reply. I have another update button that will save the form. But commenting out won't work because I want to hide that button only for one table. For other table data, I'm using that button.

Thanks,

Amol

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

 

Hi @Tai Vu,

Thank you for your reply. The UI action you provided is correct. I have just added a condition in the UI conditions as "current.getTableName() != 'incident' ", and it's working for me. Now I'm unable to see that Save button for the records of incident table which is I want to achieve.

Thank you once again!

Amol