cancel
Showing results for 
Search instead for 
Did you mean: 

SAP RAP: Hiding Actions

lars_kr
Participant
0 Kudos
206

Hello Community,

Is it possible to hide actions completely instead of just deactivating them?

In my use case, a user should not even see the actions if he does not have the required role.

In my case, I have an inline action:

@ui.lineItem: [
    {
      type:#FOR_ACTION,
      label: 'Edit request',
      dataAction: 'edit request',
      inline: true,
      emphasized: true,
      importance: #HIGH,
      position: 100,
      hidden: #( VisibilityAction )
    }
  ]

 If I use hidden: true it works and the action is hidden. But with a virtual element and hidden: #( VisibilityAction ) it does not work.

Maybe someone here knows more

regards,

Lars

Accepted Solutions (0)

Answers (1)

Answers (1)

MioYasutake
Active Contributor
0 Kudos

@lars_kr 

One option is to create an App Variant using UI adaptation and hide the button. You can then assign the variant app to a specific role.

https://community.sap.com/t5/technology-blogs-by-sap/sap-fiori-for-sap-s-4hana-app-variants-are-the-...