Skip to main content

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