SalesforceLabs / EnhancedLightningGrid

Component that allows you to sort and filter data within the Lightning Experience. Use as a replacement for a Related List, or create a new grid that shows results from a custom query.
BSD 3-Clause "New" or "Revised" License
137 stars 97 forks source link

Cannot deploy more than 50 instances #95

Open ro-dl opened 1 year ago

ro-dl commented 1 year ago

If a package contains more than 50 instances in one or more felxypages, deployment fails with message: "Invalid datasource. Encountered runtime exception in Apex class: [sortablegrid.sdgProperties]. The exception is caused by hitting the System.LimitException: Too many SOQL queries.

mcarrilloatsalesforcedotcom commented 1 year ago

@ro-dl, there are a minimum number of queries that run when initializing the component that has to comply with the Governor Limits. Judging by the number (50 instances) should be 2 SOQL queries. Can you provide more details about your use case?

ro-dl commented 1 year ago

@ro-dl, there are a minimum number of queries that run when initializing the component that has to comply with the Governor Limits. Judging by the number (50 instances) should be 2 SOQL queries. Can you provide more details about your use case?

Hi @mcarrilloatsalesforcedotcom,

In one of our orgs, there are various Lightning record pages, each embedding multiple instances of the component. This prevents us from deploying flexipages that collectively have more than 50 references to 'sdg' within the same package. Additionally, we face a limitation where we are unable to add 'sdg' components to a flexipage that already contains 49 instances.

The 'sdg' Aura component utilizes the Apex class 'sdgProperties' as the data source for the 'SDGConfiguration' attribute, and it executes 2 SOQL queries for each component instance.