我正在尝试在Salesforce Developer Console中运行以下查询,以查看View All Data权限或查看所有商机中存在多少permissionSetID。以下查询有什么问题?
SELECT Id, Name, PermissionsViewAllData, IsOwnedByProfile
FROM PermissionSet
WHERE Id IN (SELECT ParentId
FROM ObjectPerms
WHERE SobjectType='Opportunity'
AND PermissionsViewAllRecords=true)
我看到以下错误:
WHERE Id INn(选择ParentId FROM ObjectPerms WHEREe SobjectType ='机会'
行的错误:1:列:112 sObject类型' ObjectPerms'不受支持。如果您尝试使用自定义对象,请务必添加' __ c'在实体名称之后。请参考您的WSDL或描述调用以获取相应的名称。
答案 0 :(得分:0)
您只需将对象名称更改为从ObjectPerms
到ObjectPermissions
SELECT Id, Name, PermissionsViewAllData, IsOwnedByProfile
FROM PermissionSet
WHERE Id IN (SELECT ParentId
FROM ObjectPermissions
WHERE SobjectType='Opportunity'
AND PermissionsViewAllRecords=true)