I have a few cases where I'm using an InfoPath form in a SharePoint list (for instance, as the default content type, so that clicking "New" in a Document Library opens an InfoPath form in the browser).
In the form's code-behind I would like to programmatically create a new item in another list, setting a Lookup Field's value there to the ListItemID of the item associated with the open InfoPath form. But I can't find any way to identify the ListItemID (or
GUID) of the InfoPath form.
Does anyone know how to get the ListItemID of an InfoPath form in a SharePoint list, from within the InfoPath form's code-behind?
View Complete Post