Get Form within a rule in FormLoadComplete event?
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?
Try this code line.
customize.Messaging.StatusBar.WriteSucess("Form Caption: " + pVal.Form.Value);
Oh right, i forget the pVal Parameter. Thanks a lot :)