Error in Task form with code behind - InfoPath Dev
in

InfoPath Dev

Error in Task form with code behind

Last post 03-20-2007 04:01 PM by Matt Faus. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 03-06-2007 09:48 PM

    • Yashvir
    • Not Ranked
    • Joined on 01-11-2007
    • India
    • Posts 2

    Error in Task form with code behind

    We created one infopath form(web enabled)with code behind
    and using it as task form for our workflow.

    We copying ".dll" file of form code in folder where form is copied in run time
    copying is done through command in "Install.bat" file.
    Form is rendring on the site when we go to task list and edit that task
    It is throwing an error on click of approve or reject button
    saying "Object refrence null"
    when we debugged the form code while debugging the workflow code
    we found that the variable because of which this error was coming was actually initialized in the form load part
    and that variable is not retaining the value for it.
    while reading somewhere i come to know something about formState.

    Can you please elaborate on it or if you have any solution for this
  • 03-20-2007 04:01 PM In reply to

    Re: Error in Task form with code behind

    Hi Yashvir,

    If the OnLoad is not being called for the form and you need it to be, then you should be able to simply call it yourself from the other form.

    From what I understand it you simply took the FormCode.cs file from another form and included it as a resource file in a new form. If so, this new form will not call OnLoad or any of the other event handlers for that matter. In this case, you will need to initialize the variable in some other fashion, such as a Init() method.
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.