You need to sign in to do that
Don't have an account?
dotneteric
How do you determine field-level security / field visibility?
Is there a way to determine field-level security (aka field visibility) for a profile or for the logged in user's profile through Apex?
From the doc:
Schema.DescribeFieldResult f = Account.AccountNumber.getDescribe(); Boolean notHidden = f.isAccessible(); Boolean notReadonly = f.isUpdateable();
All Answers
From the doc:
Schema.DescribeFieldResult f = Account.AccountNumber.getDescribe(); Boolean notHidden = f.isAccessible(); Boolean notReadonly = f.isUpdateable();
Would this code work at the object level also?
Yes the same methods are available on the SObject describe result. See the apex dev guide referenced above for the syntax.