Declared forms vs default forms when saving a record and displaying it
I am stumped on this and would be grateful for any guidance.
Intended Workflow:
- The user opens a record in edit mode, using a link provided
- They enter fields in the form and hit the "Submit" button
- The record saves, and an "On Save" form rule sets a flag on the record
- The record then reopens in display mode using the same form (which displays different sections based on the flag set above)
The constraint is that I cannot use the default form on the roles to control this behaviour.
I have formulated the link in this manner:
var text URL = URLRoot() & "db/" & Dbid() & "?a=er&rid=" & [Record ID]&"&dfid=40"; //NOT the default
var text Words = "My Link here";
"<a href=" & $URL & ">" & $Words & "</a>"
I've created a custom "Submit" button in this manner:
"<a id='Testsavebutton' class='Vibrant Success' onclick='DoSaveAdd()' href='#'>Submit</a>"
When the user clicks the custom "Submit" button, the record saves, briefly showing declared form 40 in the background, then displays the record using the default form instead. I cannot get it to display the record in the form I declare.
Things I've tried unsuccessfully:
- Changing the link provided by using the &NextURL parm (with the dfid parm included)
- Changing the link provided by using the &rdr parm (with the dfid parm included)
- Changing the custom submit button to use Linkaway
- Changing the custom submit button to use DoSave
Some combinations above will open the record in the default form in edit mode, some will open the record in the default form in display mode, but nothing I have tried will open the record in the declared form in display mode.
Anyone have a suggestion?
Thanks,
------------------------------
Ian Ward
------------------------------