Code Before Rules? - InfoPath Dev
in

InfoPath Dev

Code Before Rules?

Last post 04-06-2010 09:47 AM by karteek. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 03-31-2010 03:02 PM

    Code Before Rules?

    Hi, I have a form with a couple of buttons. Clicking on any of the buttons first executes the RULES and then jumps to execute the code in the FormCode.cs file for the button click event. However, if I have "Close the Form" as one of the Rules for the button, the code does not execute. So, is there a way that I can close my Infopath fom after executing the code instead of closing from the RULES? Also "The form has been closed" is the message which pops up after closing form through rules. Can we redirect to the form library instead of showing this message? Thanks !
    Karteek Peri
  • 04-01-2010 11:22 AM In reply to

    I tried to execute everything through code in FormEvents_Submit. It works fine if I have a single submit button. But how would i differenciate if there are multiple buttons like Approve, Reject etc.
    Karteek Peri
  • 04-06-2010 12:32 AM In reply to

    • Dedek
    • Not Ranked
    • Joined on 11-05-2009
    • Posts 5

    Don't use submit event. Use on_clicked event instead. Now You can differenciate multiple events & buttons. To submit form in on_clicked event just call DataConnections["yourSubmitDataSource"].Execute() method.

  • 04-06-2010 09:47 AM In reply to

    Hey Dedek, Thanks for your reply. The form works fine if I use the button click event but I cannot close the form from the button click events.
    Karteek Peri
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.