문제

I have a SOSL query that finds Salesforce Campaigns, and that's working just fine. However, I need to retrieve all Account Team Members for each returned Campaign. Is it possible to add a subquery to SOSL?

Here's what I have so far:

List<List<sObject>> searchList = 
    [FIND :CampaignSearchTerm RETURNING Campaign (Id Where IsActive = true Order By Name)];

If it is not possible, I have a different question. Can SOSL results be assigned to a Map or Set to avoid from having to put together all of the IDs in a for-loop for an SOQL query (for the sake of efficiency)?

Thanks!

도움이 되었습니까?

해결책

You are correct :) But in terms of efficiency, SOSL is only bringing <= 200 results so producing Id lists for SOQL should have a negligible impact.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top