August 17, 2012

Example for System.debug() in Salesforce

The main use of System.debug() is to track the flow of program and find errors.


parsedCSVdata = parseCSV(fileString,false);
System.debug('Parsed CSV Data -->' + parsedCSVdata);

To see this go to Setup --> Administration Setup --> Monitoring --> Debug Log
Assign the user and execute the Apex code. Then refresh the debug log page and click view button.

Debug log:

No comments:

Post a Comment