Stack Exchange Network
Stack Exchange network consists of 181 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.
Sign up to join this community
Anybody can ask a question
The best answers are voted up and rise to the top
So i have Two Queries
SELECT Id, DurableId FROM FieldDefinition WHERE EntityDefinitionId ='Student__c' AND QualifiedAPIName = 'Hobby__c'
What i want to do is take the DurableId from the above Query and add in to Second query below
SELECT DurableId,EntityParticleId,Id,IsActive,IsDefaultValue,Label,ValidFor,Value FROM PicklistValueInfo where EntityParticleId =_DurableId_From_First_Query
I know it is possible in apex code But,
Is is possible to make it a single SQOL query, how can i achieve this in a single query ?
56.1k1414 gold badges4747 silver badges8888 bronze badges
asked Feb 11 at 20:16
Aman PatilAman Patil
45822 silver badges1212 bronze badges
Yes it is possible, using the IN operator. use the 1st query in the where clause of the 2nd query, like this:
SELECT DurableId... FROM PicklistValueInfo
WHERE EntityParticleId In
(SELECT DurableId FROM FieldDefinition WHERE EntityDefinitionId ='Student__c' AND QualifiedAPIName = 'Hobby__c' )
answered Feb 11 at 21:53
1,55755 gold badges3232 silver badges7474 bronze badges
You must log in to answer this question.
Not the answer you're looking for? Browse other questions tagged