tirsdag 26. november 2013

Dimension value lookup step-by-step

This first post contains two small steps for creating a dimension value lookup on a form control.

1. Create a class (MyLookup) which inherits SysLookup and override the lookupDimension() method with the following code.
public static lookupDimension(FormStringControl _stringControl, 
                              Name              _dimensionName)
{
     SysLookup::lookupDimension(_stringControl, _dimensionName);
}

2. Override the lookup method of the formcontrol.
public void lookup()
{
    MyLookup::lookupDimension(this, 'CostCenter');
}

Ingen kommentarer:

Legg inn en kommentar