I am creating a form that uploads to a sharepoint form library. The form upload is working perfectly, I create a unique identifier based on concatenating user entered data & the Sharepoint ID. The submit button will create one unique filename that will always remain constant. My problem comes from the workflow through Sharepoint. I created workflow that sends emails with links to the documents. This works fine except whenever trying to submit the form to the library again. I then get the below error (private information removed):
InfoPath cannot submit the form.
An error occurred while the form was being submitted.
The form cannot be submitted to the following location: http://(Navigation)/testing16.xml
The file "Informatics Data Requests/testing16.xml" is checked out or locked for editing by DOMAIN\User.
The operation completed successfully.
So basically I cannot re-submit my form if I open it from the workflow email (which for my end users will be a requirement). I have also validated that document check out is not a requirement on my form library. I figured out that by using the save feature I can save the form and it will update the Sharepoint Library. I want this to be on a custom button instead of the delivered save feature as I do not want to confuse my end users about which they should use and when. I have also looked at adding a button with only the close feature that prompts the end user to save, but I would rather have it save and close automatically instead of additional clicks. I have tried
this.save() ;
this.Application.ActiveWindow.Close();
with no success so far. I am open to other options but I want it to be seamless to my end users so they always think they click the button at the bottom of the form.
Any help you can provide would be great.
Thanks,
Dustin