在Dynamics AX 中按条件分不同颜色显示表格中的记录
在Data Sources 的相关表下新建displayOption方法
public void displayOption(Common _record, FormRowDisplayOption _options)
{
InventTrans InventTransLocal;
InventTransLocal = _record;
Switch(InventTransLocal.ItemId)
{
Case "1001100141":
_options.backColor(6029311); //Light Yellow
_options.textColor(12582912); //Blue
//_options.affectedElementsByControl(InventTrans_ItemId.id());
Break;
Case "1001100191":
_options.backColor(16761281); //Light Blue
_options.textColor(12582912); //Blue
Break;
}
}