function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sravya Sadhu 4Sravya Sadhu 4 

Error:

Hi support,

Attempt to de-reference a null object Error is in expression '{!Save}' in component <apex:commandButton> in page createbusinessaccount: Class.AccountController.Save: line 21, column 1  An unexpected error has occurred. Your development organization has been notified

whenever i crete a record and click on save tthis error is showing.
nitesh gadkarinitesh gadkari
Hi,

I think you have written like this account ac;

you have to create first instance of that object.e.g.

account ac=new account();

then fill in details like

 ac.name='something';
 then 

 insert ac;


Regards
Nitesh