I am new to salesforce. I was trying to update that account record name belong to me. I am getting
System.NullPointerException: Attempt to de-reference a null object
could some can help me here is my class
public with sharing class AccountController {
ApexPages.StandardController GstdController;
public Account ER;
ApexPages.StandardController stdcontroller;
public AccountController(ApexPages.StandardController controller) {
GstdController=controller;
this.ER= (Account)controller.getRecord();
this.stdController = controller;
}
public PageReference Save() {
system.debug('Save::::1111');
String rType = ApexPages.currentPage().getParameters().get('RecordType');
system.debug('sc::::'+rType);
this.ER.RecordTypeId = rType;
PageReference pr= stdController.save();
//insert ER;
pr.setRedirect(false);
system.debug('Save::::2222');
return pr;
}
}