Hello, all.
When I fill out a form through InfoPath Forms Services I can choose to either save it to the form library or submit the form to somewhere. (In my case a web service). To the best of my understanding, when you save the form, the information is submitted to a SharePoint database where it is assigned a unique ID. In my target use case someone will go to the SharePoint form library, create a new form, fill it out then submit it to the database and save it to the form library. The problem is I need a way to hook the form info that gets saved to the form library to the form info that the web service recieves. From the way I understand it though, the form info is not assigned a unique ID until it's saved to the SharePoint DB. (The ID is part of the way SharePoint works, not something InfoPath gives it) so there's no way to associate the web service's form to the form saved to the SharePoint database.

I guess I need to find a way to somehow assign each form someone fills out a unique ID during the time before it's submitted or saved. How would I do that?
Thanks!