I am trying to override the displayOption
on my form so that I color certain lines following certain conditions, When my condition was related to a normal field I had no problem with that, example code:
public void displayOption(Common _record, FormRowDisplayOption _options)
{
if (_record.(fieldnum(MY_Table,My_Field))=="YES")
{
_options.backColor(WinAPI::RGB2int(161,161,255));
}
super(_record, _options);
}
but my problem is, I want to make a condition on a displayMethod not a normal field
A display method will work, you just need to cast the Common _record
to your table buffer, then you can access the table method.
So if it was SalesTable
, you would create:
SalesTable salesTable;
salesTable = _record as SalesTable;
if (salesTable.yourTableDisplayMethod == "whatever") { // Do something }
Then you can use the display method as normal.