Selasa, 19 April 2011

Create Own Sequence Number at Ms.Dynamics Ax

spAXrrttaaaaaaaann!! ..

Gowd ... sometimes we need own Sequence Number for our form at Axapta.
so these is code from one of my friends Dwipa Rachmawan(Ms.Dynamics Ax Technical), these code produces the order Number Sequence for our form without enrolled in the system sequence number that already exists in Axapta.

Select one table n create a Method
public void nextTaxInterval()
EHCTAXValueAddSubGroup eHCTAXValueAddSubGroup;
Select maxof(TaxInterval)
From eHCTAXValueAddSubGroup
where eHCTAXValueAddSubGroup.TaxGroupId == this.TaxGroupId;
// where eHCTAXValueAddSubGroup.TaxSubGroupId != this.TaxSubGroupId;
This.TaxInterval = eHCTAXValueAddSubGroup.TaxInterval + 1;


n then at form that contain with that datasource/table, generate Create method
public void create(boolean _append = false)

Tidak ada komentar:

Posting Komentar