Get Form within a rule in FormLoadComplete event?

martinsalo

Hello Forum,


 


I want to execute a rule *one* time after a form and its data is loaded.


And the rule should calculate and change some values and show them on the form. So the DB Content must be loaded.


I think "FormLoadComplete" suits at best this requirement.


 


Now I have to get a reference on the form (to access the textboxes). I have looked at some rules and found this lines:



Form myFrm = Form.GetFormFromUID(SwissAddonFramework.B1Connector.GetB1Connector().Application.Forms.ActiveForm.UniqueID);
customize.Messaging.StatusBar.WriteSucess("Form Caption: " + myFrm.Value);

But the problem is that I still get the previous form! Is there an eaysier way to get the form where the event is fird?


 


 


 


 


Regards


 


Martin



Manuel Kuebler

Try this code line.



customize.Messaging.StatusBar.WriteSucess("Form Caption: " + pVal.Form.Value);

martinsalo

Oh right, i forget the pVal Parameter. Thanks a lot :)



0

Comments

0 comments

Please sign in to leave a comment.

Didn't find what you were looking for?

New post