function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
chennachenna 

How to pull fields,data type on profile based from objects

How to pull fields,data type on profile based from objects?

Jia HuJia Hu

If you want to check the Field-level security setting of each profile,

query the FieldPermissions object

doc:

http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_FieldPermissions.htm

 

If you want to get the data type of each field of each object,

use Apex sObject Describe Result Methods

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_fields_describe.htm

such as 

Schema.DescribeFieldResult F = Account.AccountNumber.getDescribe();