Dynamics AX Blog - Microsoft Dynamics AX (Axapta) - Page 22

These posts are machine-translated.
Currently, only posts from category »Microsoft Dynamics AX (Axapta)« are displayed Filter entfernen

In recent years, i spent a lot of time in developing in the environment of Microsoft Dynamics AX (formerly Axapta). During this time i created a lot of code, from which I could imagine, that it might be very useful for other AX developers too. But I will present also tips and tricks round the powerful ERP system.

Subscribe to RSS feed of this category

AX 2012: SysOperation-Framework: Initalize parameters of a data contract

If you include the SysOperationInitializable class in a data contract using the implements command, the method initialize() gets available and can be overwritten.

This method can be used to initialize variables within the data contract. However, this method is only called as long as no usage data is found or it is not activated.

[DataContractAttribute]
class TutorialSysOperationDataContract
    implements SysOperationInitializable
{
    date dialogDate;
}

 

[DataMemberAttribute]
public TransDate parmDialogDate(TransDate _dialogDate = dialogDate)
{
    dialogDate = _dialogDate;
    return dialogDate;
}

 

public void initialize()
{
    dialogDate = systemDateGet() - 365;
}

 


 
 

Validate voucher for duplicates in Dynamics AX 2009

Following code could be useful, if you have to check for duplicates voucher numbers:

ledgerParameters::checkDuplicate(_voucher, _date);

 
 

AX 2012: Selecting the values of a financial dimension

The following job demonstrates how to display the values of a financial dimension - in the example Department - via X++.

static void getValues4Dimension(Args _args)
{
    DimensionValueService dimensionValueService;
    DimensionContract dimensionContract;
    List dimensionValueContractList;
    ListEnumerator listEnumerator ;
    DimensionValueContract dimensionValueContract;
    DimensionValue dimensionValue;

    dimensionValueService = new DimensionValueService();
    dimensionContract = new DimensionContract();
    dimensionContract.parmDimensionName('Department');
    dimensionValueContractList = dimensionValueService.getDimensionValues(dimensionContract);
    listEnumerator = dimensionValueContractList.getEnumerator();

    setPrefix(strFmt("Dimension %1: ", dimensionContract.parmDimensionName()));
    while(listEnumerator.moveNext())
    {
        dimensionValueContract = listEnumerator.current();
        dimensionValue = dimensionValueContract.parmValue();

        info(dimensionValue);
    }
}

 
 

Whitepaper for global address book

The global address book is probably one of the great new features in Dynamics AX 2009.
And especially when upgrading from earlier versions questions may occur.
Some of these questions are answered in the Microsoft white paper on the global address book, but certainly not all;-)

However, every developer and consultant should lead this White Paper once to mind. Because the whitepaper contains, for example, a description how to import customers / vendors or business relations via Excel.

http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=052e9dda-667b-42bd-bd13-f8c5aa1bc0f0


 
 

Tip: Convert job into class

Did you know that you can easily convert a job to a class simply by copying the job to classes-node in AOT using drag & drop?


 
 

Move pallet using X++

Using the following code, you will be able to move a pallet per code.

WMSPalletMove wmsPalletMove = new wmsPalletMove();
wmsPalletMove.parmWMSPalletId('00000022_117');
wmsPalletMove.parmToInventLocationId('300');
wmsPalletMove.parmToLocationId('01');
if(wmsPalletMove.validate())
{
   wmsPalletMove.run();
}

 


 
 

What is the difference between update and doUpdate?

What is the difference between update() and doUpdate()? You canfind the answer on MSDN or you take a look at the following table.

Method Note
insert vs. doInsert When raisng the doInsert the insert-method of the table will not be called
delete vs. doDelete When using the doDelete method the delete method of the table will not be called, but the delete-method of the xRecord will be called, therefore DeleteActions will work
update vs. doUpdate When raisng the doUpdate the update-method of the table will not be called

 


 
 
Pages « 1 ... 19 20 21 22 23 » 

 

 
 
 
Posts of the actual month
April 2025
MoTuWeThFrSaSu
 123456
78910111213
14151617181920
21222324252627
282930 
 
© 2006-2025 Heinz Schweda | Imprint | Contact | German version | Mobile version
In order to provide you with better service, this site uses cookies. By continuing to browse the site, you are agreeing to our use of cookies.