You need to sign in to do that
Don't have an account?
How can determine if current user has read/write access to an account
I have a dispatch Apex class that needs to determine whether a user has read/write or read-only rights for a particular Contact. I did some reading online and found this link : http://wiki.developerforce.com/index.php/Testing_CRUD_and_FLS_Enforcement
and based on that information, I used the following code:
Boolean isReadWrite = Schema.sObjectType.Contact.fields.name.isUpdateable();
The parameter isReadWrite is always returning false, even when the user is the owner of the account.
Any ideas on how to proceed?
Also, I need comparable functionality for Opportunities and Accounts, though I assume that all three use cases will follow the same general pattern.
I saw ESAPI http://code.google.com/p/force-dot-com-esapi/ - have you used this? Is there a native way to achieve the getUpdateableFields function in the ESAPI?