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

Overwritting New
I have overwritten the custom object 'New' button, I would like to access the id of the record when they click the 'New' button. Is it possible to get the Id of the record before it is committed to the DB(sounds stupid..but i thought I will still go ahead and ask)
This is the contructor
private Sales__c salesesource;
public salesResourceController(ApexPages.StandardController controller) {
salesesource = (Sales__c)controller.getRecord();
System.debug('Called salesResourceController' +salesesource );
}
you can get it by saving temporly and then create savepoint and rolling back in the mean while of this process u can get the record id by using getCurrentId()
All Answers
No this is not possible because the record is not saved and there is no logical ID created by SFDC at this point of time...
you can get it by saving temporly and then create savepoint and rolling back in the mean while of this process u can get the record id by using getCurrentId()