• rforce
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 3
    Replies

Im receiving the following error when attempting to save the following VisualForce page.  Does anybody have any suggestions?  Im stumped.

 

Thanks in advance

 

 VF Page

 

 

<apex:page controller="editNewProjectExt" sidebar="false" showheader="false"> <apex:form > <apex:pageBlock title="Edit new project information" id="newproj" mode="edit"> <apex:pageBlockSection columns="2"> <apex:outputLabel value="Project Name"/> <apex:inputField value="{!myProject.Name}"/> <apex:outputLabel value="Account" /> <apex:inputField value="{!myProject.Account__c}" /> <apex:outputLabel value="Original Completion Date" for="OCDInput"/> <apex:inputField id="OCDInput" value="{!myProject.Original_Completion_Date__c}"/> </apex:pageBlockSection> <apex:pageBlockButtons > <apex:commandButton action="{!saveChanges}" value="Save" /> <apex:commandButton action="{!getupdCaseList}" value="Update Cases" /> </apex:pageBlockButtons> </apex:pageBlock> </apex:form> </apex:page>

 

 

 

 Controller

 

public class editNewProjectExt{ Project_KA__c myProject; integer dayOffset = 0; date OCD=date.Today(); // Orginal completion date of new project date TCD=date.Today(); // Target completion date of new project, stores the user input from VF page on new orginal completion date List<Case> myCaseList; private final ApexPages.StandardController controller; public editNewProjectExt(ApexPages.StandardController controller){ this.controller = controller; myProject = (Project_KA__c)controller.getRecord(); myProject = [select Id, Name, Account__c, Target_Completion_Date__c, Original_Completion_Date__c from Project_KA__c where Id = :myProject.Id]; } // Getter public Project_KA__c getmyProject() { return myProject; } // Save method public pagereference saveChanges() { // myProject.Original_Completion_Date__c=OCDVF.Original_Completion_Date__c; update myProject; PageReference pageRef = new PageReference('/' + myProject.Id); pageRef.setRedirect(true); List<Case> myCaseList = getupdCaseList(); return pageRef; } // Calc new days public List<Case> getupdCaseList(){ if(myProject.Id<>Null){ myCaseList = [select Id, Date_Du__c, Internal_Date_Due__c from Case where Project__c = :myProject.Id]; // Set date veriables OCD= myProject.Original_Completion_Date__c; TCD= myProject.Target_Completion_Date__c; OCD=date.Today(); // loop through and update case details system.debug('OCD = '+OCD); system.debug('TCD = '+TCD); dayOffset = OCD.daysBetween(TCD); system.debug(dayOffset); for(Case myCaseListItem:myCaseList) { Case newCase = myCaseListItem; newCase.Date_Du__c = myCaseListItem.Date_Du__c + dayOffset; newCase.Internal_Date_Due__c = myCaseListItem.Internal_Date_Due__c + dayOffset; upsert newCase; } //for loop } // myClaseList select return null; // do not return anythign out of this method PageReference('/?id='+myProject.Id); } // getmyCalseList method } // For the class

 

 

 

 

 

 

 

Hi,
I have developed an application,prior to Friday when i used to do a build using Ant to any org Build got Successful but now i am facing a wierd situatution saying that Build Failed because of An error occurred on your page.
But Same code if i deploy from other Org it is getting Successful.

Any Help would be Great.

Regards,
Mohammed Junaid.