• Rohan62003
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
I have embedded the Scheduler Interface in my code , calling as a method from another class which bind with page e.g ABC.

On reloading the page “ABC” or performing the action that calls my main class , I am getting below exception. It shows somehow code does work but I am not able to see in “Schedule Jobs” under set up>>monitoring.
I have embedded the Scheduler Interface in my code , calling as a method from another class which bind with page e.g ABC.

On reloading the page “ABC” or performing the action that calls my main class , I am getting below exception. It shows somehow code does work but I am not able to see in “Schedule Jobs” under set up>>monitoring.

Check out this strange behavior I have encountered.  The basic scenario is that there is a VF page created with standard controller (for our example, Contact object) and then you extend the controller and in the extension you create an object of a different type (in this example we create an opportunity).

 

Then you add a simple form to the page to capture a lookup (in this example we'll have an input field for the Account of the Opportunity we've defined).  Lastly, create a button that will basically do nothing (just refresh the page).

 

Renders ok, but when you lookup an Account, then hit the button you get a strange "An error occurred when processing your submitted information." error message on the input field.  What is the deal?  Does anyone have any suggestions on how to make this work?

 

 

page:

 

<apex:page standardController="Contact" extensions="MyExtension"> <apex:form> <apex:inputField value="{!myOpp.Account}"/> <apex:commandButton action="doSomething" value="Do Something"/> </apex:form> </apex:page>

 

extension:

 

public class MyExtension { public Opportunity myOpp {get;set;} public MyExtension(ApexPages.StandardController controller) { myOpp = new Opportunity(); } public PageReference doSomething(){ return null; } }