简体   繁体   English

如何使用“ Salesforce对象查询语言(SOQL)”合并两个不同的查询?

[英]How can i merge two different queries using “Salesforce Object Query Language (SOQL)”?

Currently am making two calls to salesforce API to fetch the data, below are the two queries: 当前正在对Salesforce API进行两次调用以获取数据,以下是两个查询:

1>SELECT PermissionSetAssignment.AssigneeId,PermissionSetAssignment.PermissionSet.Name FROM PermissionSetAssignment where PermissionSetAssignment.PermissionSet.IsOwnedByProfile=false  order by PermissionSetAssignment.AssigneeId

2>SELECT UserOrGroupId,Group.Name FROM GroupMember  order by UserOrGroupId

Can we have a single query instead of two? 我们可以有一个查询而不是两个查询吗?

Please help Salesforce GURU's. 请帮助Salesforce GURU。

如果这些表之间有关系,则可以在第一个查询本身中直接获取UserOrGroupId

There is no relation between Permission Set Assignment and Group Member. 权限集分配和组成员之间没有关系。 So you have to use two query and you wont be able to do it in one query. 因此,您必须使用两个查询,而您将无法在一个查询中执行此操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM