I usually need to find the field security profiles that a particular field is part of and to achieve that I always go through all the Field Security profiles to check if the field is present. Is there any way to accomplish that quickly? Does anyone know any XRMToolbox plugin or even an SQL query?
I usually need to find the field security profiles that a particular field is part of and to achieve that I always go through all the Field Security profiles to check if the field is present. Is there any way to accomplish that quickly? Does anyone know any XRMToolbox plugin or even an SQL query?
Share Improve this question edited Feb 5 at 23:41 André Andrade asked Feb 5 at 23:01 André AndradeAndré Andrade 3133 silver badges14 bronze badges1 Answer
Reset to default 0After taking a look at the database using "SQL 4 CDS" XRMToolbox plugin, I could create this query that helped me to find what I was looking for.
SELECT
fsp.FieldSecurityProfileId 'Profile ID',
fsp.Name AS 'Profile Name',
fp.cancreatename AS 'Can Create',
fp.canreadname AS 'Can Create',
fp.canupdatename AS 'Can Update'
FROM
FieldSecurityProfile fsp
JOIN
FieldPermission fp ON fsp.FieldSecurityProfileId = fp.FieldSecurityProfileId
WHERE
fp.AttributeLogicalName = 'logical_name' -- Replace with the logical name of your field
AND fp.CanUpdate = 4 -- 4 indicates "Allowed" and 0 indicates "Not Allowed" in Field Security settings