none
Getting exception (Object reference not set to an instance of an object) during Upload Form Template after schema change RRS feed

  • Question

  • I have been developing a form template in Infopath 2010 using Visual Studio Tools for Applications. The form includes managed code. I discovered a promoted field in which the value was getting truncated. I replaced the field with a new field group and wrote code moved the value to the SharePoint library record.

    This was all working until i removed the old data field and control from the form. I cleaned all of the references to the former field that i could find.

    Now the Design Checker is saying that it can't verify the form against the server and I get an "Object reference not set to an instance of an object." error when attempting to upload.

    Please advise. Thank you.

    Friday, December 28, 2012 9:11 PM

All replies

  • Hi Lemonerchant,

    Thanks for posting in the MSDN Forum.

    I will involve some experts into your thread to see whether they can help you. There might be some time delay, appreciate for your patience.

    Have a good day,

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, December 31, 2012 12:59 AM
    Moderator
  • Hi Lemonmerchant,

    So if I understand this correctly, you were having a problem with one of your promoted properties, where the data in the form was being truncated in the library.  You ended up replacing the column with a new field, and added code to move data from the old field to the new one.  Please let me know if I have misunderstood anything so far.

    After you got everything working, you removed the old field and control from the template, cleaning up all the references to it that you could find.  Now, you receive "Object reference not set to an instance of an object" errors when attempting to upload.

    Based simply on this information, I want to say there is still a reference somewhere in a rule that is causing these problems.  If you open the template's Rule Inspector (Data Tab >> Rule Inspector), see if you can find any "Invalid Field" or references to the now deleted field.

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Regards,
    Ian Kavanagh
    Microsoft Online Community Support

    Wednesday, January 2, 2013 8:59 PM
  • There answer was not an old reference in the Rules. I looked there already. The issue was with an XPath reference to the old data object in the new MultiSelectListBox control. I recreated the control and it resolved the issue.

    The details are in this other post:

     Getting exception (Object reference not set to an instance of an object) during Upload Form Template after schema change

    Tuesday, January 8, 2013 3:56 PM