how to override displayoption method on form datasource throw extension using coc or eventhandler
can any one help me and give an example please as i used the following code and its not working
[ExtensionOf(formDataSourceStr(SalesTable, SalesLine))]
internal final class NAQLA_SalesTableFormSalesLineDS_Extension
{
public void displayOption(Common _record, FormRowDisplayOption _options)
{
#define.color(0,191,255)
if(_record.(fieldNum(SalesLine,ItemId) == 'A0001')
{
_options.backColor(WinAPI::RGB2int(#color));
_options.affectedElementsByField(fieldNum(SalesLine,SalesId));
}
next displayOption(_record, _options);
}
}
Thanks guys i think it will help me
Please check this link.
www.theaxapta.com/.../set-background-color-for-field-in-form.html
Hi OmarAbdlhamed,
Please check the sample code of customization for adding color to a form control of a standard or custom form by using event OnDisplayOptionInitialize.
community.dynamics.com/.../override-displayoptions-method-of-a-datasource-in-extensions-in-ax7
André Arnaud de Cal...
291,965
Super User 2025 Season 1
Martin Dráb
230,817
Most Valuable Professional
nmaenpaa
101,156