The polymorphism tag has no wiki summary.
5
votes
1answer
132 views
Determine if a Type implements an interface
I've created an interface within a managed package that installers can implement (much like the example here and Making your managed package extensible with Apex Plugins). Clients can then configure ...
5
votes
1answer
88 views
Can I create a polymorphic key from a custom object?
I'm creating a custom object that needs to be related to multiple other objects (but only one per record). I.e. via a ParentId field it could be related to a Opportunity, a Contact, an Account, or ...
1
vote
2answers
108 views
Is the OwnerId field in the Report object a polymorphic key or not?
Is the OwnerId field in the Report object a polymorphic key or not?
So the OwnerId field in the Report object can be either a reference to a Folder, Account, or User, doesn't this make it a ...
4
votes
1answer
252 views
Is SOQL Polymorphism enabled by default in API 26?
Is SOQL Polymorphism enabled by default in API 26? I'm getting the error 'SOQL TYPEOF expressions are not supported in this organization' error when deploying to my test org that's on API 26.
2
votes
2answers
234 views
SOQL Polymorphism Results
What kind of result set is returned from this SOQL and can I write this inside a for loop?
[SELECT Name, Description,
TYPEOF OwnerId
WHEN Folder THEN Name
END
FROM Report]
7
votes
1answer
392 views
SOQL query on fields related by polymorphic lookups
Here is the SOQL query I am trying to make:
List<Task> tasks = [
SELECT Id,ActivityDate,Status,Subject
FROM Task
WHERE What.Type = 'nexus__Goal__c'
AND ...
3
votes
1answer
377 views
What are the best practices for using polymorphism in Apex?
Apex provides at least two different methods for polymorphism (that is, writing code that can use objects of different classes in a uniform way):
Standard inheritance-based polymorphism, where code ...
