Salesforce Apex Scheduler
To schedule an Apex class to run at some regular intervals, first write an Apex class that implements the Salesforce-provided interface Schedulable. The scheduler runs as system: all classes are ....
To schedule an Apex class to run at some regular intervals, first write an Apex class that implements the Salesforce-provided interface Schedulable. The scheduler runs as system: all classes are ....
A developer can now employ batch Apex to build complex, long-running processes that run on thousands of records on the Force.com platform. Batch Apex operates over small batches of records, ....
Sample Code: Trigger: trigger AccountTrigger on Account ( before insert ) { for ( Account acct : trigger.new ) { if ( acct.Name == 'Test Account' ) acct.Description = 'Test'; ....
To write/develop a unit-test/test class for Salesforce Apex Triggers, then in the Test Class, we have to do the DML operations based on the events used in the Apex Trigger. ....
To Run Unit test: To run unit testing, go to Setup Menu --> App Setup --> Develop --> Apex Test Execution and then select the Test Class and click ‘Run’ ....
Unit testing: http://wiki.developerforce.com/page/An_Introduction_to_Apex_Code_Test_Methods http://wiki.developerforce.com/page/How_to_Write_Good_Unit_Tests http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_testing_unit_tests.htm Testing Controllers and extensions: http://www.salesforce.com/us/developer/docs/pages/Content/pages_controller_error_handling.htm Running Unit Test Methods: http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_testing_unit_tests_running.htm Cheers!!!
window.onload or action attribute in apex:page can be used as OnLoad function in Salesforce Visualforce page. Method 1(Calling Javascript): <script type = "text/javascript"> window.onload=function() { alert("Hi"); }; </script> Method 2(Calling ....
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 ) ....