Skip to main content
Jeevanjyot Kaur (Bristlecone) 님이 #SOQL Queries에 질문했습니다

Hi,

 

Is it possible to provide joins in SOQL and get the data of multiple fields from different objects in a single query.

Is Join with User object possible?

 

For example if below query is possible : 

If query like : Select PermissionSetLicenseAssign.Id, PermissionSetLicense.MasterLabel, User.Id, User.Name from PermissionSetLicenseAssign where PermissionSetLicenseAssign.AssigneeId = User.Id

 

#SOQL Queries #Joining #SOQL Query #REST API #Child Object #User Licenses #Sales Cloud #Integration User.Id

답변 3개
  1. 2021년 10월 8일 오후 12:31

    Hi Jeevanjyot! There's no join in SOQL as well as in SQL. But you can bring parent records and child records using Relationship Queries.  

    For your case, maybe you can use the Asignee field to bring the User data. Like this:

     SELECT PermissionSetLicenseAssign.Id, Assignee.Id, Assignee.Name FROM PermissionSetLicenseAssign WHERE AssigneeId = :bind_variable

     

    I hope I've helped,

    Best regards!

0/9000