declarative-lookup-rollup-summaries icon indicating copy to clipboard operation
declarative-lookup-rollup-summaries copied to clipboard

Replace Schema describe with SOQL EntityDefinition/FieldDefinition-based validation

Open sfenton3 opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe. Potentially query the EntityDefinition and FieldDefinition SObject instead of global schema to avoid API dependencies and release problems.

Describe the solution you'd like If DLRS is at API Version 58 but the object is new in API Version 59, DLRS's current strategy is unable to validate that the object exists and rejects the rollup configuration save. DLRS should be able to determine the object exists even at higher API versions to allows users to create rollups before DLRS can provide an updated release.

Describe alternatives you've considered Apex can query the EntityDefinition and FieldDefinition SObjects. Using the data available here shouldn't be API gated and should allow confirmation of object names and fields without relying on Schema Definition methods.

Additional context https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_fielddefinition.htm https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_entitydefinition.htm

sfenton3 avatar Jul 26 '23 15:07 sfenton3