How to convert from sObject to String using Salesforce Apex Class?
How to convert from sObject to String using Salesforce Apex Class?
To convert sObject to String in Apex, below i s the example,
Example:
public sObject searchContact;
String strObjType = String.valueOf(searchContact);
Enforcing field level security using Salesforce Apex Class?
You can determine field level security by using getDescribe() . Below is the example.
Schema.DescribeFieldResult fieldld = Account.Phone.getDescribe();
Boolean notHidden = fieldld.isAccessible();
Boolean notReadonly = fieldld.isUpdateable();
Schema.DescribeFieldResult fieldld = Account.Phone.getDescribe();
Boolean notHidden = fieldld.isAccessible();
Boolean notReadonly = fieldld.isUpdateable();
No comments:
Post a Comment