You need to sign in to do that
Don't have an account?

Getting null value from field
Hey,
I am updating value of Max_Health_and_comfort__c in 1st vf page. Now i want to add some value on the same field in the next vf page. But i am getting null value from the field so i am not able to do addition .
I am using taking pageid from the url , creating object of the custom object obj and than trying to do addition,
HomeEvaluation__c obj = new HomeEvaluation__c();
Id pageid=ApexPages.currentPage().getParameters().get('id');
obj.Id=pageid;
MaxHealth = Maxvalue + obj.Max_Health_and_comfort__c;
On the 4th line i am getting error because i am getting null value in Max_Health_and_comfort__c, eventhough there is some value in the record.
I am updating value of Max_Health_and_comfort__c in 1st vf page. Now i want to add some value on the same field in the next vf page. But i am getting null value from the field so i am not able to do addition .
I am using taking pageid from the url , creating object of the custom object obj and than trying to do addition,
HomeEvaluation__c obj = new HomeEvaluation__c();
Id pageid=ApexPages.currentPage().getParameters().get('id');
obj.Id=pageid;
MaxHealth = Maxvalue + obj.Max_Health_and_comfort__c;
On the 4th line i am getting error because i am getting null value in Max_Health_and_comfort__c, eventhough there is some value in the record.
Thanks for the reply. i just need to fetch the value from the record. why i am not able to use that. and controller going to be refreshed when it gets redirected so i dont think it will hold a value.