You need to sign in to do that
Don't have an account?
Aam M
Save & New Button
In custom "Save and New" button I've to fetch the same parent from Lookup in every record when we click the save & new button.
How can we achive this ? Please reply ASAP
Like in this pic every new record same Account should be selected when we select for the first record!!
Anyone Please reply ASAP.
It will be very helpful for us.
How can we achive this ? Please reply ASAP
Like in this pic every new record same Account should be selected when we select for the first record!!
Anyone Please reply ASAP.
It will be very helpful for us.
instead of ApexPages.addMessage() (plural method instead of the singular method).
Add Message will only spit out one error messages, while Add Messages will spit out all the errors in the exception.
Some additions to this code that might help anybody else who stumbles on here would be to make sure your Save & New action is passing along any pre-filled values on to the next Create page. This is important when createing detail objects, so that the Master field is already filled in.
My code kinda looks like this...
The querystring that I read during the contructor phase should remain untouched by your processes. SF will dump in other variables into the querystring, keeping track of the view state, etc. which you don't want.
I might be missing something else here, but so far this works for my use cases.
Good luck!
All Answers
instead of ApexPages.addMessage() (plural method instead of the singular method).
Add Message will only spit out one error messages, while Add Messages will spit out all the errors in the exception.
Some additions to this code that might help anybody else who stumbles on here would be to make sure your Save & New action is passing along any pre-filled values on to the next Create page. This is important when createing detail objects, so that the Master field is already filled in.
My code kinda looks like this...
The querystring that I read during the contructor phase should remain untouched by your processes. SF will dump in other variables into the querystring, keeping track of the view state, etc. which you don't want.
I might be missing something else here, but so far this works for my use cases.
Good luck!
Instead of Contact use you custom controller and in vf page use all required fileds for your custom object like look and others
my Email id is-spnvarun0121@gmail.com
2. When user clicks on the custom button add parameters to the url passing the parent lookupid. eg: 'apex/page?parentid='+parentid
3. In the constructor check if accountid exists ApexPages.getCurrentPage().getParameters().get('parentid') initialise your child object variable with the parentid