Posts

Showing posts with the label polymorphic

Salesforce Fact #858 | Polymorphic SOQL on ContentDocumentLink

Image
This is how we can use a polymorphic SOQL on ContentDocumentLink LinkedEntity field. Ideally the fields which can be selected comes from a Name Sobject which is relevant when dealing with polymorphic relationship queries. Reference:  https://developer.salesforce.com/docs/atlas.en-us.238.0.object_reference.meta/object_reference/sforce_api_objects_name.htm?_ga=2.114364804.2097756510.1721467571-1754518336.1719649716 Attached is the screenshot.

Salesforce Fact #726 | Accessing polymorphic fields in graphQL LWC

Image
How do you access Polymorphic fields in graphQL wire adapter in LWC? Suppose we want to access the related case owner names of an account in graphQL. Since, Case Owner is a polymorphic field so we need to consider both the user and queue owner possibilities. Reference:  https://developer.salesforce.com/docs/platform/lwc/guide/reference-graphql-relationships.html Attached are the screenshots.