SALESFORCE Salesforce Configuration Salesforce.com

How to check the custom field as External ID and Unique field using apex class

How to check the custom field as External ID and Unique field using apex class its achievable with the help of DescribeFieldResults on each Salesforce Objects, below is the sample code for your reference: Schema.DescribeFieldResult Acc = Account.Account_Number__c.getDescribe(); System.debug(Acc.isExternalID());  //…

Read More
APEX SALESFORCE Salesforce Customization Salesforce.com

How to get field data types for each fields in Salesforce objects?

How to get field data types for each fields in Salesforce objects? we can get the all the standard and custom objects fields data types using the getGlobalDescribe, getDescribe, getType. String objType=’Account’; Map<String, Schema.SObjectType> schemaMap = Schema.getGlobalDescribe(); Schema.SObjectType leadSchema =…

Read More