preloader-matrix

Alfasith

Code to get the line no to grid in Dynamic AX

Hi,

use below code in the create method of the form in data source level.

 select maxOf(SequenceNumber) from dNPhaseLoc where dNPhaseLoc.DNModularID == DNModule.DNModularID;
 if(DNPhase)
      DNPhase.SequenceNumber = dNPhaseLoc.SequenceNumber +1;
  else
        DNPhase.SequenceNumber = 1;

//Just add SequenceNumber as interger field for your table with reference to header datasoure record you need to use where clause.
Thus line no will be created.

Regards,

Leave a Reply

Your email address will not be published. Required fields are marked *