What is usage of RP.isRelatedList() || RP.isOneToMany() || RP.isManyToMany() in UI action buttons?

VENKATESH PUNGA
Tera Contributor

Hi Everyone,

 

I am not how to use  things RP.isRelatedList() || RP.isOneToMany() || RP.isManyToMany()? what is full form RP?

 

Thanks,

Venkat

6 REPLIES 6

Priya Shekar
Giga Guru

Hi Venkat,

Pls check the below links,

https://docs.servicenow.com/bundle/london-application-development/page/app-store/dev_portal/API_refe...

ServiceNow KB: RP.isRelatedList() returns false when used with List context menu option on UI action...

How To Get Parameters/Values From a URL in ServiceNow | SN Commander

If my reply has helped you,Kindly click the Helpful button.
If my reply is the answer you were looking for, Kindly click the Accepted Solution button.

Thanks,
Priya

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Venkat,

That is out of box I believe

check below

https://developer.servicenow.com/app.do#!/api_doc?v=london&id=RP-isInDevStudio

Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Munender Singh
Mega Sage

Hi,

 

1.RP.isRelatedList() - is used when a table is used as a related on other form.

2.RP.isOneTOMAny() - is being used when you want to display or hide an ui action on related list which hold the parent -child relationship

3.RP.isMantTOMany() - is being used when you want to display or hide an ui action on a m2m tables which is being used as related list

 

Regards,

Munender

AbhishekGardade
Giga Sage

Hello Venkat,

check out few points:

1.RP :  is render properties.

The RenderProperties API provides methods about the current page and is available in Jelly scripts and in UI-action conditions and scripts.

Access RenderProperties methods using the static variable RP.

methods and API:

isRelatedList()
Returns true when the sys_is_related_list URL-parameter is true. Returns false if the parameter is not present.

Return:
Type Description
Boolean True if the URL parameter sys_is_related_list is true.

isManyToMany()
Returns true when the sysparm_collection_related_file URL parameter is set.

Return:
Type Description
Boolean Returns true when the sysparm_collection_related_file URL parameter is set.

For more details:

https://developer.servicenow.com/app.do#!/api_doc?v=london&id=RP-isManyToMany

Please mark as Correct Answer/Helpful, if applicable.
Thanks!
Abhishek Gardade

Thank you,
Abhishek Gardade