Which is 1st? Code or Rules

S

Smolakm

I am building a new form using InfoPath 2007. I have a button on the form
which I have about 6 rules set to run when it is clicked. I also need to
add a small piece of managed code to run when the button is clicked as well.
My question is...will the managed code run before the rules are applied once
the button is clicked, and if not, is there a way to get the code to run
before the rules?
Thank you.
 
K

Kalyan Reddy

Hello,

Rules run before Code. If you dont want to run Rules first before Code. You
can write the rules in code and allow the code which you want to run before
these codes(Rules)
 
S

Smolakm

Write rules in the code? How do I reference the rules in the code. Are
thir apis that directly call the rules I need?
Thanks.
 
K

Kalyan Reddy

Hello,

You can write the rules in code by using Event handlers
If on changing the value in a field use OnAfterChange
If by click on Button use OnClick event
if you want when the form opens use OnLoad event like wise.
 
Top