Hmmm I believe both of the above work but my problem still persists. Let me explain further:
I am using an XFA Form throughout my workflow but prior to the final user step (a step where a Digital Signature will be applied) I covert the XFA to a Document Form. This Document Form is then what I present to the user at the final workflow step.
Since it is a Document Form, my Workspace button of "Complete" isn't working and I was told that if I changed the submission type of the form's submit button from "XDP" to "pdf" then it might.
Ah now I understand what is happening ..... doid you drop the process fields onto your form? If you did, then it the Hierarchy view you can click on the FSSSUBMIT_ button. Then in the Object palette, click on the Submit tab. In the Submit As dropdown select PDF. Save your form and try it again.
Well, I believe I need the submission to be XDP throughout the workflow and only have it change to PDF prior to the final user step where the form gets Digitally Signed - thus my request for the code to do so dynamically.
I tried applying the code you offered on the FSSUBMIT_ button as opposed to my actual Button1 I put on the form but to no avail. When I click the "Complete" button in Workspace, the form just sits there.