You need to sign in to do that
Don't have an account?
Zarq Iqbal
How to find relationship names in ObjectPermissions and PermissionSet Objects
Just like Contacts is the name for the relationship between Contact and Account Object.
I need to perform a query which would fetch results from ObjectPermissions, PermissionSet and Profile
I need to perform a query which would fetch results from ObjectPermissions, PermissionSet and Profile
Below are the 4 child of these object and their relationship name please chcek and let me know if it helps you
All Answers
SELECT Id, Name,
(SELECT Id, LastName FROM Contacts WHERE LastName = 'Doe'),
(SELECT Id, StageName FROM Opportunities)
FROM Account
WHERE Id IN (SELECT AccountId FROM Contact WHERE LastName = 'Doe')
But I need to do something like this:
Select Id,(Select Id from PermissionSets)from PermissionSet Where ParentID in(Select Id from ObjectPermissions)
This gives an error because the name of the relationship is not "PermissionSets". How do find all these relationships between these standard objects?
If you are using eclipse id then simply you can check everything in schema else you need to go to that object and check the field and relationship name..
Thanks,
sandeep
I'm working with ObjectPermissions and PermissionSet objects here. They are not present in the cloud account schema builder or as objects over there. Unlike account and contact.
Please check using this..
Select (Select ParentId, SobjectType From ObjectPerms) From PermissionSet
Below are the 4 child of these object and their relationship name please chcek and let me know if it helps you
Thanks alot. This is helpful.
This is with one level of children. Like PermissionSet has these 4 children (SetupEntityAccessItems,Assignment,ObjectPerms,FieldPerms).
Now I want to go from Profiles to PermissionSet to it's children.
Also could you tell me how you found out the relationship names for these?
SetupEntityAccessItems
Assignments
ObjectPerms
FieldPerms
I wasn't able to find them through the documentation which is ridiculously outdated!
As I mentioned above if you are using eclipse IDE for coding then there is schemna where you can easily find all things...
P.S. If my answer helps you to solve your problem please mark it as best answer. It will help other to find best answer.
You can get all thigs like it shows in eclipse..
Thanks,
But this doesn't seem to work upto two levels. I tried it.
As I mentioned from Profile --> PermissionSets-->ObjectPermission
Thanks
You can simply make use of sets and maps to get tha data from multiple levels you need..
Collect all the profiles in a set then query on permission sets where profilID IN setsProfilrIDs..like this you can make maps and use as you want..
Thansk