Skip to main content

Create a new number sequence

Creating a new number sequence is achieved by creating a new reference for the


sequence. Follow these steps to create a new number sequence:

1. Create a new Extended Data Type (EDT). Often this EDT extends

num. This is not mandatory, but it is a best practice.

2. Decide which module’s parameters this number sequence reference

should be included in, and find the corresponding


NumberSeqReference sub class.

3. The loadModule() method shows a number of blocks of code, which

creates records in the table NumberSequenceReference.

4. Copy one of these blocks and change the following fields:

a. DataTypeID is the type Id of the new data type.

b. referenceLabel is the description shown in the left column of the

Number sequence tab on the parameters form.

c. referenceHelp is the longer description of the reference shown in

the top part of the Number sequence tab of the parameters form.

d. sortfield defines the sequence that the references are displayed

on the Number sequence tab of the parameters form.

5. There are a number of wizard fields used for default values when

using the wizard to create number sequences.

6. Create a static method used to retrieve the reference. This is usually

done on the relevant parameters table. Parameters tables show

methods beginning with numRef. Use one of these methods as a

template.

7. The reference can then be referred to using this static method

Popular posts from this blog

Code to get Invoice settlement data for customer in ax 2012

This is simple Code to get Invoice settlement amount data for customer payment in ax 2012. This data is after posting of data. select sum(SettleAmountCur) from custSettlement where custSettlement.TransRecId == custtrans.RecId If you want get settlement amount before posting than you can refer spectrans table.The table SpecTrans contains all the transactions marked for settlement for payment journal. while select spectrans join custtransopen join custtrans where spectrans.SpecCompany == ledgerjournaltrans.DataAreaId && spectrans.SpecTableId == ledgerjournaltrans.TableId && spectrans.SpecRecId == ledgerjournaltrans.RecId && spectrans.RefCompany == custtranssopen.DataAreaId && spectrans.RefTableId == custtranssopen.TableId && spectrans.RefRecId == custtranssopen.RecId && custtransopen.RefRecId == custtrans.RecId && custtransopen.AccountNum == custtrans.AccountNum { info...

Cancel Deliver Remainder through X++ (Sales Order ) DAX

 To Cancel Deliver Remainder through X++ you can use below code sample. Thanks. static void _CancelDeliverRemainder_Sales(Args _args) {     SalesLine SalesLine = SalesLine::find('SO0013', true);     ;           if (SalesLine)     {         // Set remaining inventory Qty to zero         SalesLine.RemainInventPhysical  = 0;           // Set remaining physical Qty to zero         SalesLine.RemainSalesPhysical   = 0;                                   // We have to cancel the SalesLine                  SalesLine.PurchStatus           = PurchStatus::Canceled;                    SalesLine.update();         ...

Add Miscellaneous Charges to a Purchase Order in MSD Axapta

Add Miscellaneous Charges to a Purchase Order To add miscellaneous charges to a purchase order, follow these steps: 1. Click Accounts payable > Purchase Order Details. 2. Select a purchase order and then click Posting > Invoice. 3. Enter or select an invoice. 4. Select which miscellaneous charges transactions to add, change, or delete: a. To add, change, or delete miscellaneous charges transactions for the invoice header, click Setup > Misc. charges on the Overview tab. b. To add, change, or delete miscellaneous charges transactions for an invoice line, click the Lines tab, and then click Misc. charges. c. To add, change, or delete miscellaneous charges for the invoice header for a summary invoice that is selected on the Overview tab, click the Purchases tab, and then click Setup > Misc. charges. 5. In the Misc. charges transactions form, enter the miscellaneous charge from the invoice that you received from your vendor. 6. If necessary, you can click ...