Get Infopath field error for some fields not all

Sep 2, 2010 at 9:28 PM

I got this exception for some fields:

DP.Sharepoint.Workflow.DPWorkflowException: Error getting form value where path = /EbNewBusinessRequest/Account/my:AccountNumber ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at DP.Sharepoint.Workflow.IPAcce

any ideas?


Sep 7, 2010 at 2:55 PM

found out the my namspace was added with an empty Uri, which usually is set in the root element.

So I used FormData.DocumentElement.GetNamespaceOfPrefix("my") to extract the right URI.


However, if your infopath form is started from scratch all the xml nodes will have my namespace, in this case, the original codes work as expected. If the xml is mixed with nodes without my namespace, this fix is required.