Skip to main content
I have methods in a custom controller that I want to access without user input through apex but I get a null pointer exception on this line objectType = ApexPages.currentPage().getParameters().get('objType');  I was able to do what I am describing when coming from a batch process by simply wrapping pieces of the controller using apexpages in if(!system.isBatch()){}.  What could I add to this if statement to bypass when there is no page being passed in?
5 answers
  1. Sep 11, 2013, 8:49 PM
    How about adding a test for

     

    if (ApexPages.currentPage() != null
0/9000