Todd Hardin posted a reminder in the SalesLogix BP news groups of some long awaited new Form methods with ActiveForms introduced in v6.1. I got so used to doing things the old way I forgot all about them. They will definatly save some time, and make code easier to read. Thanks Todd.
I’ve only seen one prior post on this in a thread between Ryan Farley, myself, and an SLX Dev Team member about the v6.1 Beta release – so thought I would throw this out here as a reminder to everyone as these new methods and props proved useful to me recently.
The form object now has a .Post method to force data saves – I used this for modal forms where I needed the data to be saved because I was loading another (dependant) modal for on top of the first.
Retrieves the data and re-binds to form controls.
This is used to tell the form where to put focus when the form is displayed. This can be handy when used in the AXFormCreate() or AXFormOpen() events. As several of us found out previously, you can’t use MyControl.Focus to place focus where you want it, because during form Create and for Open events, the controls are not yet available. Set the .ActiveControl property to accomplish this instead.
If you want to programatically close a form, rather than using a .Close method (method does not exist). Use the ModalResult method and set the value to mrOk or mrCancel. The form will close and will return your modal result retcode to the caller.
ex. MyForm.ModalResult = mrOk
This is much better than using the legacy function –