Skip to main content

Questions tagged [polymorphic]

Filter by
Sorted by
Tagged with
0 votes
1 answer
51 views

Why joined report doesn't work with polymorphic relationship field?

Why joined report doesn't work with polymorphic relationship field? RecordId or EntityId field is a standard polymorphic relationship field which has relationship to many objects including ...
Patlatus's user avatar
  • 17.8k
2 votes
2 answers
1k 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 ...
OneCleverMonkey's user avatar
3 votes
2 answers
510 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 ...
Patlatus's user avatar
  • 17.8k
0 votes
1 answer
45 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&...
lambad's user avatar
  • 385
2 votes
1 answer
967 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 ...
Prady's user avatar
  • 12.4k
7 votes
1 answer
711 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), ...
TestMcTesterson's user avatar
2 votes
1 answer
460 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 ...
Salvation's user avatar
  • 1,209
2 votes
1 answer
1k 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 ...
user1958955's user avatar
2 votes
1 answer
688 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()....
Patlatus's user avatar
  • 17.8k
0 votes
1 answer
180 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 ...
Milan Vadhia's user avatar
1 vote
1 answer
643 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 ...
realtek's user avatar
  • 163
3 votes
1 answer
3k 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 (...
Boog's user avatar
  • 298
2 votes
1 answer
116 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 ...
Greg J's user avatar
  • 175
4 votes
2 answers
2k 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 ...
Sonja's user avatar
  • 63
5 votes
2 answers
363 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.
Michael Gill's user avatar
  • 2,212
6 votes
1 answer
1k 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 ...
snstulemeijer's user avatar
5 votes
3 answers
2k 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, ...
R.Epstein's user avatar