You need to sign in to do that
Don't have an account?
John Deitz
Getting VF page to automatically Save/Close
I have a cusom page using the standard controller for a custom object. I am passing in two fields in the URL invocation, and I simply want to Validate/Save the record and return (avoiding a user-initiated Save action). How should I configure the apex page or form elements to accomplish that.
Hi John.
So you pass parameters into the page, and then the page saves, without showing anything to the user?
If you want an action to take place as soon as the page loads, without the user having to do anything, you can create an Apex extension with an action method. Then call the action method by placing a reference to it in the VF page's apex:page tag.
If your custom object is called Handbag__c :
This assumes that you write an apex class called HandbagExtension that extends the Handbag__c standard controller, and include a method called doAutomaticThing that returns a PageReference. Either a null PageReference to stay on the same page, or a PageReference to the page you want to go to next.