Getting References to Registered Business Objects

Getting a Business Object Reference from a Form

To retrieve a reference to a registered business object, you can use the form's GetBizObj() method. This method accepts a single string parameter specifying the class name of the business object to be retrieved (you don't need to include the class namespace).

In C#:

Customer oCustomer = (Customer)GetBizObj("Customer");

And in VB .NET:

Dim oCustomer As Customer = CType(GetBizObj("Customer"), Customer)

Alternately, if you prefer a stronger typing approach, you can call another overload of GetBizObj that accepts a Type parameter.

In C#:

Customer oCustomer = (Customer)GetBizObj(typeof(Customer));

And in VB .NET:

Dim oCustomer As Customer = CType(GetBizObj(GetType(Customer)), Customer)

Getting a Business Object Reference from the Form Manager

The MM .NET Form Manager has a GetControlBizObj method that accepts a user interface control that implements the ImmBinding interface (any MM .NET user interface control) as a parameter, and returns a reference to the business object specified in the control's BindingSource property.

For example, In C#:

mmBusinessObject BizObj = (mmBusinessObject)mmAppDesktop.FormMgr.GetControlBizObj(this.txtName);

And in VB .NET:

Dim BizObj As mmBusinessObject = CType(mmAppDesktop.FormMgr.GetControlBizObj(Me.txtName), mmBusinessObject)

© (c) 2026 Oak Leaf Enterprises, Inc., 1996-2026 • Updated: 04/26/18
Comment or report problem with topic