Skip to Content
2
Dec 30, 2022 at 05:17 AM

Hide CREATE Button on Fiori element List Report based on user Authorization using CAP CDS

2071 Views

Hi Experts,

I had built a Fiori element List report application on top of CAP Service using CDS annotations. I have a requirement of hiding CREATE button on List report based on User authorization.

I had used the annotations

entity Books @capabilities(

InsertRestrictions:{

Insertable:<boolean-value>

}

)

Also used annotation

entity Books @(UI. CreateHidden:<Boolean-value>)

If I hard code Boolean value to true or false, I am able to hide Create button.

But I am unable to pass the Boolean value dynamically based on User authorization.

Can anyone let me know how to pass the Boolean value dynamically to annotations based on user authorization to hide the CREATE button on List report.

With Regards,

Partha .