How to bulkify trigger code
The term bulkifying Apex code refers to the concept of making sure the code properly handles more than one record at a time. When a batch of records initiate Apex, ....
The term bulkifying Apex code refers to the concept of making sure the code properly handles more than one record at a time. When a batch of records initiate Apex, ....
Sample Code: Apex Code: public class a{ //accessing wrapper class variable public w var {get;set} //wrapper class public class w { public String str; }} Visualforce page: <apex:outputText value="{!var.str}"/> ....
A setter method that assigns the value of this attribute to a class variable in the associated custom component controller. If this attribute is used, getter and setter methods, or ....
To hide Header and Sidebar on Visualforce page, use 'showheader' and 'sidebar' attributes in <apex:page>. Sample code: <apex:page showHeader="false" sideBar="false" > Cheers!!!
To check whether an object has accessibility on visualforce page, use the below code {!$ObjectType.MyCustomObject__c.accessible} It returns true or false. Sample code: <apex:page > Accessibility for Object 'Member__c' is {!$ObjectType.Member__c.accessible}</apex:page> ....
Visualforce page: <apex:page controller="sample"> <apex:pageBlock > <apex:pageBlockTable value="{!mem}" var="m"> <apex:column value="{!m.Name}"/> <apex:repeat value="{!m.Interest__r}" var="i"> <apex:column value="{!i.Name}"/> </apex:repeat> </apex:pageBlockTable> </apex:pageBlock></apex:page> ....
Sample Code: Visualforce page: <apex:page controller="sample"> <apex:pageBlock > <apex:pageBlockTable value="{!acct}" var="a"> <apex:column value="{!a.Name}"/> <apex:repeat value="{!a.Contacts}" var="c"> <apex:column value="{!c.Name}"/> </apex:repeat> ....
Sample Regular Expression for email validation using Apex is given below Sample Code: if(Pattern.matches('[a-zA-Z0-9._-]+@[a-zA-Z]+.[a-zA-Z]{2,4}', email)) { //success } else { ....
The recordSetVar attribute not only indicates that the page uses a list controller, it can indicates the variable name of the record collection. This variable can be used to access ....
JSON stands for “Java Script Object Notation“. JSON.serialize() is used to generate JSON. It is a lightweight data-interchange format. JSON is built on two structures: A collection of name/value pairs. ....