Alfasith AX

Alfasith AX
اللَّهُمَّ انْفَعْنِي بِمَا عَلَّمْتَنِي، وَعَلِّمْنِي مَا يَنْفَعُنِي، وَزِدْنِي عِلْمًا

Wednesday, May 7, 2014

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,

Code to call number sequence in Dynamic AX

Hi,

NumberSeq   num;
num = NumberSeq::newGetNum(DNAxaptaModule::ModularID());
//DNAxaptaModule is the table that number seq presents
AxaptaModule.DNModularID  = num.num();
//AxaptaModule is the local variable for the same above table

Regards,

SQL code to upate one Legal entity banner to all the legal entity in D365

 Hi, update companyimage set  companyimage.Image  = companyimageA.Image  from  ( select Image from companyimage where dataAreaid = 'USF...