DenEddy
DenEddy

Reputation: 23

displayOption method of datasource not called in Dynamics AX 2012

I was wondering if maybe someone had the same problem as I have. I have overriden the displayOption method on a datasource of a form in Dynamics AX 2012. This datasource is linked to a grid. I want records in this grid to have a certain background color when a certain condition is not followed.

I know the way to change the background color, so that's not the problem. The problem is that the displayOption method simply isn't called when the form is shown (I debugged and noticed it). Has anyone else had this problem before?

Thanks in advance.

Upvotes: 1

Views: 3186

Answers (2)

Jeff Ash
Jeff Ash

Reputation: 41

Here's what I am seeing... It appears that displayOption method is only called for the data source at the root of the form query. On the SalesReleaseOrderPicking form, I wanted to change grid colors according to values on the salesLine. InventReleaseOrderPicking is the root data source. I had to override the displayOption for that data source.

Upvotes: 4

ian_scho
ian_scho

Reputation: 6056

"When declared on a form datasource, display methods must have one non-optional parameter" (See Display methods on datasources). Ensure that you have the parameter as a buffer of the same type as that of the datasource.

Upvotes: 0

Related Questions