Questions tagged [polymorphic]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
2answers
76 views

SOQL WHERE Clause Filtering on Polymorphic Relationships Bug for Cases (or other objects)

According to the documentation, you should be able to run a SOQL query where you filter on the type for a Polymorphic relationship. And this works in most cases. However, there's a conflict when the ...
2
votes
2answers
46 views

How do I detect if a field is polymorphic?

I am building a package where I use child-to-parent query to get the data, and I allow users to select fields and relationships they want. This may lead to problems like this, or in my case when I try ...
0
votes
1answer
24 views

Querying multiple tables when single field contains polymorphic Ids

I have a text field called "references" that holds Id's of Other objects. Now, I want to get records that are in "references" by searching all the objects. Map<Id, CustObj1__c&...
2
votes
1answer
380 views

How do I export activities related to an account with a specific recordtype?

I am looking to export events and tasks from one organisation to another for all account records with a specific recordtype. Is there a way I can query tasks and events which are related to accounts ...
7
votes
1answer
359 views

Polymorphic keys - definitive list?

I am working with salesforce data within SQL, and am trying to come up with a proper solution to handle polymorphism/polymorphic keys. I am aware of the easy ones (whatid/whoid in task and event), ...
2
votes
1answer
243 views

SOQL TYPEOF Enabling

I getting an error from FormTitan (for creating forms with connection to salesforce). SOQL TYPEOF expressions are not supported for API versions less than 46.0 . I saw that my API version on my ...
2
votes
1answer
642 views

SOQL - Task query that includes Case Subject

I need to run an SOQL that generates activities due next week (for a Conga Composer Solution). Some of the activities are related to Cases. The What.Name for cases is the Case number which has ...
2
votes
1answer
643 views

Lightning Component Polymorphism is not working:

I am trying to use Bob Buzzard approach to get Lightning Component Polymorphism working, so I have method myAction: function(component) { component.getConcreteComponent().getDef().getHelper()....
0
votes
1answer
109 views

Search scope (polymorphic) of RelatedTo field (What) in Task and Entity SObjects

How can I retrieve values (objects names) held in search scope (Polymorphic pick list) of 'Related To' field (what) defined in Task and Entity SObjects using Apex? Please help me out for the same I ...
1
vote
1answer
398 views

Query custom fields from object with a polymorphic field

I am trying to query the ProcessInstanceWorkitem object which has a relationship to the ProcessInstance object, however the ProcessInstance object has a polymorphic relationship by using the ...
3
votes
1answer
1k views

SOQL with polymorphic fields

Confused about the behavior of polymorphic fields in SOQL, sometimes you can select parental fields through a polymorphic relationship and sometimes you cannot. For example on Task with Who (...
2
votes
1answer
48 views

Polymoprhic query on a child of Opportunity

This is my first polymorphic query so I could be missing something quite simple here, but is there another way to write this without using the TYPEOF expression? I'm getting the error that "TYPEOF ...
4
votes
2answers
1k views

Query on Task.Phone?

It looks like querying Task 'phone' is NOT supported. Can anyone confirm? I can get Owner.Phone, but not read the phone field itself. Acc. to this doc: Phone Phone number of the contact or ...
5
votes
2answers
342 views

WhatId search scope (polymorphic) and Visualforce

Can I access the WhatId search scope (polymorphic picklist) in Visualforce as a separate element. See attachment to get the full picture.
6
votes
1answer
735 views

Polymorphic ID does not accept external ID, or does it?

Requirement: Via APEX dataloader upload attachments (standard object) and link it via ParentId to a custom object's record. This works easily when the SFDC ID is provided for the polymorphic ParentId ...
6
votes
3answers
1k views

SOQL - How to obtain Parent Name of CombinedAttachments

I am unable to obtain the Name of a Parent object, where the child is CombinedAttachments. The SOQL I use is listed below and works as expected. Select (Select Id, Title, RecordType, ...