Skip links

AX – D365FO – Change Background or text color of a Form grid row using Extensions.

Use FormDataSource.displayOption method

[ExtensionOf(formdatasourceStr(Salestable, SalesLine))]
final class OTS_SalesLine_SalesTableFormDS_Extension
{

public void displayOption(Common _record, FormRowDisplayOption _options)
{
next displayOption(_record, _options);
FormRealControl ots_SalableStockQty = this.formRun().design().controlName(formControlStr(SalesTable, ots_salableStockQty));

int underSafetyStockColor = WinApi::RGB2int(255,250,205);
_options.backColor(underSafetyStockColor);
_options.affectedElementsByControl(ots_SalableStockQty.id());
}
}

For more information you can reach out to us at care@digivert.in or WhatsApp us at + 91 9990281800.

Leave a comment

Home
Account
Cart
Search