Notifications

18 views

Description

In certain circumstance when clicking "Open Im New Window" on a related list you will receive all record and not the filtered conditions

It is possible to determine how the related list was filtered using the steps within this article

Release or Environment

All releases

Instructions

Below is an example of navigating to a license_details related list and determine how the filter is applied for the associated roles related list

This process can be applied to other related lists


Process:

1)enable sql debug (detailed) and open the record you wish to see i.e

There will be multiple SQL records. I'd recommend filtering on the table you know will be used as part of the query. in this example it is "sys_user_role" label: "Role" as we are looking for roles:

SELECT ... FROM ((((( sys_user_role role INNER JOIN sys_metadata role_sys_metadata ON role.`sys_id` = role_sys_metadata.`sys_id` ) INNER JOIN sys_package pkg ON pkg.`sys_id` = role_sys_metadata.`sys_package` ) INNER JOIN ua_app_family fmly ON fmly.`app_id` = pkg.`source` OR (fmly.`scope` != 'global' AND fmly.`scope` = pkg.`source` ) ) INNER JOIN licensable_app lapp ON lapp.`app_family_id` = fmly.`sys_id` ) INNER JOIN license_has_app lhasapp ON lhasapp.`app` = lapp.`sys_id` ) WHERE lhasapp.`license` = '64c2fa214f345b4cc01f41401310c726' ORDER BY fmly.`lineage_name`,role.`name` limit 0,20 /*...*/

2) From the query look at the condition used within the where clause i.e.

WHERE lhasapp.`license` = '64c2fa214f345b4cc01f41401310c726'

This is the query conditions you need to use in filter:

3) The next step is to determine what the lhasapp.license field is from the query condition

From the below part of SQL you can see that lhasapp is an alias for the license_has_app table so the table with the filter condition lhasapp.`license` is license_has_app

"INNER JOIN license_has_app lhasapp


4)If you navigate to sys_dictionary and filter on name is "license_has_app" and element is "license"  you can see the item used for the filter is "Subscription"

5) We have now determined we should filter on the subscription field and can apply this to our filter. The results should now match that of the related list

Filter Subscription is <license detail record>


QUERY:
lhasapp_license=64c2fa214f345b4cc01f41401310c726

https://<instance>/license_details_assoc_roles_list.do?sysparm_query=lhasapp_license%3D64c2fa214f345b4cc01f41401310c726&sysparm_view=

Additional Information

This knowledge article is a guideline only. if you have any issues following this process you can always raise a ticket and a support representative may assist you

Article Information

Last Updated:2020-09-22 22:49:33
Published:2020-09-23