infopath object reference not set to an instance of an object

using VSTA / codebehind i was getting a object reference not set to an instance of an object error.

turned out i fat-fingered some code.

make sure to check the fields you are referencing.

example:

bad –

Dim sAttchID As XPathNavigator = nav.SelectSingleNode(“/my:theAttachmentLibID“, Me.NamespaceManager)

good –

Dim sAttchID As XPathNavigator = nav.SelectSingleNode(“//my:theAttachmentLibID”, Me.NamespaceManager)

Leave a Reply

Your email address will not be published. Required fields are marked *