Regular Expression for email validation using Apex in Salesforce
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 { ....
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 ....
To Save or Update record using Force.com Explorer, follow the below steps 1. Open Force.com Explorer. 2.Login into Force.com Explorer using your username, password and security token. Username: username of ....
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. ....
Sample code: Lead myLead = new Lead(LastName = 'Foo', Company='Foo Bar'); insert myLead; Database.LeadConvert lc = new database.LeadConvert(); lc.setLeadId(myLead.id); lc.ConvertedStatus = 'Closed - Converted'; Database.LeadConvertResult lcr = Database.convertLead(lc); ....
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 ....
The account hierarchy shows you the accounts that are associated through the Parent Account field, giving you a global view of a company and its subsidiaries. In the hierarchy, accounts ....
Visualforce page: <apex:page controller="testController"> <apex:form id="myform"> <apex:pagemessages /> <apex:pageBlock id="myblock"> Email Address: <apex:inputText value="{!email}" id="email"/><br/><br/> <apex:commandButton value="Click me!" action="{!checkEmail}"/> </apex:pageBlock> </apex:form></apex:page> Apex Code: public class testController{ public String email { ....
To add picklist values to existing picklist in Salesforce, follow the below steps 1. Select the picklist field. 2. Click ‘New’ Button in Picklist values and add it. Cheers!!!
To call Apex method from Custom Button, follow the below steps 1. Create a custom button and enter the following code Syntax: {!REQUIRESCRIPT("/soap/ajax/12.0/connection.js")} {!REQUIRESCRIPT("/soap/ajax/12.0/apex.js")} sforce.apex.execute("Class_Name","Method_Name",{parameter_Name:"value"}); location.reload(true); Code: {!REQUIRESCRIPT("/soap/ajax/15.0/connection.js")} {!REQUIRESCRIPT("/soap/ajax/15.0/apex.js")} var ....