Code problem on published form code. - InfoPath Dev
in

InfoPath Dev

Code problem on published form code.

Last post 12-26-2009 09:09 AM by muratalpar. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 12-25-2009 10:12 AM

    Code problem on published form code.

    Hi Everyone,

    This is my first post and I am new in infopath development. I don't like to ask a question immediately when I joint but I am really hopeless

    Anyway, I have a problem about code in published form. Code below working properly on the designer at local machine;

     

    Dim test As XPathNavigator = Me.MainDataSource.CreateNavigator().SelectSingleNode( "/my:MusteriGorusme/my:MBKTakipEdenler", NamespaceManager)

    test.SetValue("Test")

     

    But, after published form when I try to run it "Object reference not set to an instance of an object" error has occured.

    I read to many post and article but I couldn't find the reason of this error.

    Thanks in advance.

  • 12-25-2009 11:02 AM In reply to

    Re: Code problem on published form code.

    I realized that, this problem occured on the filled forms, but new forms has no problem. I hope it's helped....

     Thanks.

  • 12-25-2009 12:07 PM In reply to

    Re: Code problem on published form code.

    I think I figurout what is going on...

    I added some fields and try to update it with the code but old form's xml doesn't contain this fields, so when I try to setVaule infopath generate error.

     Now I have to find out how can I add these fields to old forms....

  • 12-25-2009 04:18 PM In reply to

    Re: Code problem on published form code.

    InfoPath has a built-in feature to upgrade previous versions of forms and add missing fields when the form is opened (on the Versioning tab of Form Options).  Have you tried that?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 12-26-2009 09:09 AM In reply to

    Re: Code problem on published form code.

    Hi Jimmy,

     Thanks for reply, and yes I solve my problem with the Versioning tab of Form Option.

     Thanks again.

Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.