Good day.
I need to highlight in the form of sales orders (SalesTable) some customers who are registered in a particular group.
Below is the code I’m writing, however, was unable to put the parameter group of customers I need.
public void displayOption(Common _record, FormRowDisplayOption _options)
{
#define.DarkGray(80, 80, 80)
#define.LightGray(200, 200, 200)
#define.White(255, 255, 255)
CustTable CustTable;
;
CustTable = _record;
super(_record, _options);
if (CustTable::find(SalesTable.CustAccount).AccountNum)
{
_options.backColor(WinAPI::RGB2int(#DarkGray));
_options.textColor(WinAPI::RGB2int(#White));
}
else
{
if (SalesTable.CustAccount)
{
_options.backColor(WinAPI::RGB2int(#LightGray));
}
}
}
In the customer master table CustTable), I could already stand out as code below.
public void displayOption(Common _record, FormRowDisplayOption _options)
{
#define.DarkGray(80, 80, 80)
#define.Red (255,0,0)
#define.LightGray(200, 200, 200)
#define.White(255, 255, 255)
CustTable localCustTable;
localCustTable = _record.data();
if (localCustTable.CustGroup == ‘CLI_PR’)
{
_options.backColor(WinAPI::RGB2int(#Red));
_options.textColor(WinAPI::RGB2int(#White));
}
else
{
_options.backColor(WinAPI::RGB2int(#LightGray));
}
super(_record, _options);
}
Can anyone help me?
Hugs.