How to convert String to Id using Salesforce Apex?
Sample Code: String a = '0013h00000SIc6uAAD'; Id i = Id.valueOf( a ); here String 'a' should be a valid record id. We cannot generate Salesforce Id using this method because ....
Sample Code: String a = '0013h00000SIc6uAAD'; Id i = Id.valueOf( a ); here String 'a' should be a valid record id. We cannot generate Salesforce Id using this method because ....
Custom labels are custom text values that can be accessed from Apex classes or Visualforce pages. The values can be translated into any language Salesforce supports. Custom labels enable developers ....
day() returns the day. month() returns the month. year() returns the year. Sample Code: Date datobj = Date.today(); Integer dy = datobj.day(); Integer mon = datobj.month(); Integer yr = datobj.year();
A timer that sends an AJAX update request to the server according to a time interval that you specify. The update request can then result in a full or partial ....
A map is a collection of key-value pairs where each unique key maps to a single value. Keys and values can be any data type—primitive types, collections, sObjects, user-defined types, ....
Collection size exceeds maximum size of 1000 error in Salesforce means List, Set & Map size exceeded more than 1000 to be shown on the Visualforce page. To avoid this, ....
Schema.DescribeFieldResult and Schema.PicklistEntry can be used to fetch picklist values of Salesforce Standard object picklist field. Sample Apex Code: Schema.DescribeFieldResult fieldResult = Account.Type.getDescribe(); List < Schema.PicklistEntry > picklistEntries = fieldResult.getPicklistValues(); ....
In Salesforce Visualforce Page, we can dynamically make a field read-only using disabled attribute. Sample Code: Visualforce page: <apex:page controller="sample"> <apex:form > <apex:pageBlock> <apex:pageBlockSection columns="2"> <apex:pageblockSectionItem> <apex:outputLabel value="State"/> </apex:pageblockSectionItem> <apex:pageblockSectionItem> ....
Integer.valueOf() can be used to convert String to Integer using Apex in Salesforce. Check the following code for reference. Sample Code: String str = '100'; if ( str.isNumeric() ) { ....
SOSL stands(Salesforce object search language) SOQL stands for(Salesforce object query language) Works on multiple objects at the same time. Need to write different SOQL for multiple objects. Cannot be used ....