Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

Understand UI action conditions.

Alok21
Giga Expert

Hi Team,

Can someone please help me to understand the below conditions of UI action.

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

Regards,

Alok sahu

1 ACCEPTED SOLUTION

Alikutty A
Tera Sage

Hi,

The 3 condition means as follow

1. current.canCreate()  - Does user has access to create a record in the related table (or passes can create ACL)

2. !RP.getListControl().isOmitNewButton()  - Is the new button enabled on the List control of your related list

3. RP.isRelatedList() && !RP.isManyToMany() - This a Related list and it is not a many to many relations table(sys_m2m)

Thanks!

View solution in original post

2 REPLIES 2

Alikutty A
Tera Sage

Hi,

The 3 condition means as follow

1. current.canCreate()  - Does user has access to create a record in the related table (or passes can create ACL)

2. !RP.getListControl().isOmitNewButton()  - Is the new button enabled on the List control of your related list

3. RP.isRelatedList() && !RP.isManyToMany() - This a Related list and it is not a many to many relations table(sys_m2m)

Thanks!

Hi,

I used condition RP.isRelatedList() to visible new custom button on related, but its not working can you advise what I missing 

find_real_file.png