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

getting created record id
I want to use my CMSForce form to create a new record.
Is there anyway for me to get the Id for the just created record?
Im thinking use CMSForce for the 'basic' form fields then forward the Id to another page with
more custom form items to finish the process.
You're very close to the solution !
The only problem is that you're modifying the code in the wrong place (FormController is for inclusion of forms on external sites).
Put your code in the RenderFormComponentController class and you should be good to go.
All Answers
I looked at the source code and I see the FormController class has a saveObject method.
In that method there is a reference to the return url field called Return_URL__c.
I am getting the record id of the created object using:
I tried appending this id to the return url, but it doesnt work.
Seems the only place I can affect the return url string is
by editing the the 'Return Url' field in the web form editor.
Why I am not able to modify the return url in the FormController class?
Is there anyway for me to programmatically modify the return url, on the fly?
Here is what I would like to try:
You're very close to the solution !
The only problem is that you're modifying the code in the wrong place (FormController is for inclusion of forms on external sites).
Put your code in the RenderFormComponentController class and you should be good to go.
David, whew!
Thank you! Thought I was losing it there for a bit.
I'm like "If I edit and changes don't show, I must be way off!" lol
:manhappy: