Example 1: Example 2: Apex Class: public class con { public contact c { get; set; } public con() { c = new contact(); } public void search() { …
APEX
-
-
Apex Class: public class sampleExtension { ApexPages.standardController std = null; public sampleExtension(ApexPages.standardController sc) { std = sc; } public PageReference doCancel() { return …
-
Displaying the check box in a data table or page block table is a general requirement in every project. with the help of wrapper class we can display the checkboxes …
-
Apex Class: public class checkcontact { public list con {get;set;} public boolean cc{get;set;} public checkcontact() { con=new list(); cc=true; con=[select name,email from contact]; } public void change() { if(cc==false) cc=true; …
-
APEX: public with sharing class clsDateFormat { Datetime myDateTime = system.now(); List dateFormats = new List { ‘dd.MM.yy HH:mm:ss’, ‘MMMMM dd, yyyy hh:mm:ss a’, …
-
Letter Date or Time Piece Examples G Era G = AD y Year yy = 09, yyyy = 2009 M Month MM = 08, MMM = Aug, MMMMM = August …
-
Serializing JSON from Apex Apex Class: public with sharing class jsonAccount { public string AccountNameList {get;set;} public jsonAccount() { list accList = [Select Id,Name From Account]; System.debug(JSON.serialize(accList)); AccountNameList = JSON.serialize(accList); } …
-
public class simpleHTTPCallOut {public simpleHTTPCallOut(ApexPages.StandardController controller) { } String ErrorMessage; public void Login() { ErrorMessage=”; final string baseUrl = ‘https://login.salesforce.com/‘; final string username = ‘[email protected]’; final string password = ‘test@123’; …
-
APEX CLASS: public class TestMapController{ public map data {get;set;} public TestMapController(){ data = new map(); for(Account acc: [Select Id, Name, (Select Id, Name, Email from Contacts), Phone from …
-
1) Using Suppose you have standard Case object and have one custom child object named “Child__c” to case. Then you can show your relatedlist on vf page using below code. …