At First export listpage form to xpo file and change form’s FormTemplate property to the none. Now you can override the displayoption() method with this code.
public void displayOption(Common _record, FormRowDisplayOption _options)
{
#define.Green(0, 255, 0)
#define.Orange(255, 128, 64)
#define.LightGreen(64, 128, 128)
#define.White(255, 255, 255)
FRTImportTable importTable;
;
importTable = _record.data();
if (importTable.Status == FRTImportStatus::PreInvoice)
{
_options.backColor(WinAPI::RGB2int(#Green));
_options.textColor(WinAPI::RGB2int(#White));
}
else if (importTable.Status == FRTImportStatus::OpenInvoice)
{
_options.backColor(WinAPI::RGB2int(#Orange));
}
else
{
_options.backColor(WinAPI::RGB2int(#LightGreen));
}
super(_record, _options);
}
Export new form to another xpo file. Open each xpo file and find displayoption() method from second xpo file. Copy and paste below code to the first xpo file between METHODS and ENDMETHODS branches.
SOURCE #displayOption
public void displayOption(Common _record, FormRowDisplayOption _options)
{
#define.DarkGray(80, 80, 80)
#define.LightGray(200, 200, 200)
#define.LightGray2(20, 20, 20)
#define.White(255, 255, 255)
FRTImportTable importTable;
;
importTable = _record.data();
if (importTable.Status == FRTImportStatus::PreInvoice)
{
_options.backColor(WinAPI::RGB2int(#DarkGray));
_options.textColor(WinAPI::RGB2int(#White));
}
else if (importTable.Status == FRTImportStatus::OpenInvoice)
{
_options.backColor(WinAPI::RGB2int(#LightGray));
}
else
{
_options.backColor(WinAPI::RGB2int(#LightGray2));
}
super(_record, _options);
}
ENDSOURCE
Save the first xpo and import to the ax.