• Dhivya K
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
Hi,

I wanted to retreive contact object that is mapped to a specific account. Is this possible with SOSL? I am getting null contacts for the given accountid. If this is not possible, kindly suggest me an alternate that could fetch all contacts mapped to a account,website id,etc.

This is my query:

            String soslQuery = "FIND {" + accountid + "} IN ALL FIELDS " +
                "RETURNING " +
                "Contact(Id, Phone, Email, FirstName, LastName, AccountId,CEB_Id__c LIMIT 1), " +
            "Account(Id, Phone, Name)";

Thanks