Trigger to count number of Contacts associated with an Account
You can use the following trigger to count the number of Contact records associated with an account record. Note: For existing records, do a one time data load with the ....
You can use the following trigger to count the number of Contact records associated with an account record. Note: For existing records, do a one time data load with the ....
Sample Batch Class: Test class for above Batch Class: @isTestpublic class AccountUpdateTest { static testMethod void test() { Database.QueryLocator QL; Database.BatchableContext BC; List<Account> AcctList = new List<Account>(); AccountUpdate AU = ....
Sample Batch Class: Test class for above Batch Class: @isTestpublic class AccountUpdateTest { static testMethod void test() { Database.QueryLocator QL; Database.BatchableContext BC; List<Account> AcctList = new List<Account>(); AccountUpdate AU = ....
Address Field in Lead object is a Compound Field. 1. Street2. State3. PostalCode 4. Country SOQL: SELECT Street, State, PostalCode, Country FROM Lead
Sample Formula: NOT( REGEX( Miscallaneous__c , '[0-9]*' ) ) Cheers!!!
Now() is used to display current date and time in a field using formula field.
Today() is used to display current date in a field using formula field.
Sample Code: <apex:outputPanel style="visibility:{! IF(ISNULL(PGList), 'hidden', 'visible') }"> <apex:outputText styleClass="bld" value="Public Group(s) :"/><br/> <apex:pageBlockTable value="{!PGList}" var="PG"> <apex:column value="{!PG.Name}"/> </apex:pageBlockTable> </apex:outputPanel> here PGList is a list variable.
1. Go to Setup --> Build --> Customize --> Search --> Search Settings.
Sample Code: Event objEvent = new Event(); objEvent.Type = 'Email'; objEvent.Subject = 'Test'; objEvent.Description = 'Testing'; objEvent.StartDateTime = System.now(); objEvent.EndDateTime = System.now().addMinutes( 60 ); objEvent.Location = 'Sample'; insert objEvent; Output: