How to run Batch apex instantly?
To run or execute Batch Apex instantly, go to Developer Console. In the Apex Code section, use the following code:mergeNumbers M = new mergeNumbers();Database.executeBatch(M); where mergeNumbers is a Batch Apex ....
To run or execute Batch Apex instantly, go to Developer Console. In the Apex Code section, use the following code:mergeNumbers M = new mergeNumbers();Database.executeBatch(M); where mergeNumbers is a Batch Apex ....
global class scheduledMerge implements Schedulable { global void execute(SchedulableContext SC) { mergeNumbers M = new mergeNumbers();// Batch Apex class to be called } } Cheers!!!
Sample Trigger: trigger memberInviteNotify on Member__c ( after insert,after update ) { List < Messaging.SingleEmailMessage > listMessages = new List < Messaging.SingleEmailMessage >(); for ( Member__c member:trigger.New ) ....
Lookup filter is used to filter the values to be shown in lookup relation. Check the below link for more details http://infallibletechie.blogspot.in/2013/04/lookup-filter-in-salesforce.html Cheers!!!
Trigger.new : Returns a list of the new versions of the sObject records. Note that this sObject list is only available in insert and update triggers, and the records can ....
Salesforce Setup Audit trail is used to store the configuration or metadata changes in the org.
List<Account> acct = new List<Account>(); String sql = 'SELECT Name,Phone,External_ID__c,Type,Industry,AccountNumber,Description,FAX,SLA__c,Rating,(SELECT Name,StageName,CloseDate,Probability FROM Opportunities) FROM Account WHERE ID=:localId'; acct = Database.Query(sql); for(Account ac:acct) { List<Opportunity> opptys = ....
MyList.clear(); Where MyList is a List variable. Example: List<Account> MyList = new List<Account>(); MyList.add(new Account(name = 'test'); MyList.clear(); // Removes the accounts Cheers!!!
getChildRelationships() can be used to retrieve all the related or child objects of an object in Salesforce Apex. Sample code: Schema.DescribeSObjectResult objResult = Account.SObjectType.getDescribe(); List < Schema.ChildRelationship > objRelationships = ....
Step 1: Generate Partner WSDL. Save the generated Partner WSDL. Step 2: Generate Apex code using the generated Partner WSDL. Copy the generated code and create a new Apex Class. ....