current.canCreate() && !RP.getListControl().isOmitNewButton() && !RP.isRelatedList()

Pooja124
Kilo Contributor

May I know why we have used this condition in UI actions.

3 REPLIES 3

Ajay_Chavan
Kilo Sage

Hi Pooja,

 

canRead(), canWrite(), canCreate(), and canDelete()

These four methods can be called on a GlideRecord without any arguments, and each will return a boolean true/false value, indicating whether the record can be read, written to, created, or deleted.

These methods take no arguments, because they apply to the entire record rather than to a given field.

 

RP.getListControl().isOmitNewButton():

ListProperties function to check isOmitNewButton status

 

 

 Please mark correct or helpful if this resolves your query

 

Regards,

 

Ajay

Glad I could help! If this solved your issue, please mark it as Helpful and Accept as Solution so others can benefit too.*****Chavan A.P. | Technical Architect | Certified Professional*****

what is RP?

 

how is "RP.getListControl().isOmitNewButton()" used?

 

how do I hide the "New" button on a list based on role?

Miroslaw M
Tera Contributor

In UI Action condition enter gs.hasRole('manual_task')  or whatever your role will be.