Common APEX And Visualforce Errors And Solutions
Problem: no viable alternative at character
Opportunity.Description__c='ABCD' NOT Opportunity.Description__c="ABCD"
Problem: Returning PageReference doesn't redirect to detail page
Solution (Possible):
Make sure DML statement insert or update is done before preparing and returning page reference.
PageReference pPage=new ApexPages.StandardController(request).view();
pPage.setRedirect(true);
insert request;
return pPage;
Problem: Incorrect code coverage OR Comments are considered for code coverage. OR Strange issues with code coverage.
Workaround:
The solution to this problem is clearing the test Results log at the pathhttp://xyz.salesforce.com/07M where xyz is salesforce instance (ex: cs1,ap1 etc) or Go to Setup>Develop>Apex Test Execution>View Test History> Clear Test Results.
http://salesforcetipsntricks.blogspot.in/2012/03/strange-issue-with-code-coverage-in.html
Comments
Post a Comment
Feedback - positive or negative is welcome.