Tuesday 26 September 2017

DIXF: Importing any table data with Financial Dimension (default Dimension) field in the table

DIXF: Importing any table data with Financial Dimension (default Dimension) field in the table

Lets say, I want to import the data into MKxyz Table with 3 fields as below.

1. StId
2. StName
3. DefaultDimension

Source: 
In the source we have the Dimension as
Department : A01
Purpose : Std
Ex:
StID,StName,Dept,Purpose
1,abc,A01,Std
2,xyz,A02,Ptc

Solution :

Here I am not going to talk about, how to import data using DIXF for that you can refer here
So now we are going to talk about, how to convert the above CSV file to use with DIXF.
we need to convert the file as below.
StID,StName,DefaultDimension
1,abc,A01--Std
2,xyz,A02--Ptc

To summaries
DefaultDimension is give as per the dimension sequence setup
lets say the sequence is
1. Department ,Cost-center and purpose
then the value in Default Dimension field is DD-CC-PP
2. Department ,Cost-center and purpose and we don't have cost-center value
then the value in Default Dimension field is DD--PP
3. Department ,Cost-center and purpose and we don't have purpose value
then the value in Default Dimension field is DD-CC-




Sunday 24 September 2017

Update Customer / Vendor Email address or phone number AX 2012 X++

In this topic, we will learn how to update the customer / vendor Email Address  or Phone number
static void MK_CustomeremailUpdate(Args _args)
{
    DirPartyTable            dirparty;
    DirPartyLocation dirPartyLocation;
    LogisticsElectronicAddress elecAddress;
    LogisticsElectronicAddressRole elecAddressRole;
    LogisticsLocationRole locRole;
    CustTable                           cust = CustTable::find('CXXX'');///Replace with vendTable for Vendors
// Update all the customers use the while loop or you can just use the above fine method to get the customer.  
while select cust
    where cust.AccountNum != " "
    {
        select forUpdate firstOnly elecAddress
        where elecAddress.Location == DirPartyLocation::findOrCreate(cust.Party, 0).Location
        && elecAddress.Type == LogisticsElectronicAddressMethodType::Email; // Replace with Phone to update phone number
        if (elecAddress.RecId)
        {
            info(strFmt("%1 , %2 - email - %3", cust.AccountNum, cust.name(),elecAddress.Locator));
            ttsBegin;
            elecAddress.Type = LogisticsElectronicAddressMethodType::Email; // for phone type should be phone
            elecAddress.Locator = 'xxx.aaa@xxx.com'; // for phone number give the new Phone number
            elecAddress.update();
            ttsCommit;
            info(strFmt("%1 , %2 - email - %3", cust.AccountNum, cust.name(),elecAddress.Locator));
        }
       
    }
}

Thursday 7 September 2017

Virtual Machine(VM) setup to access Dynamics 365 for Operation instance.

https://dynamicsax708.wordpress.com/2017/03/16/virtual-machinevm-setup-to-access-dynamics-365-for-operation-instance/

References:

SI NOTOPICSSOURCES
1Access Microsoft Dynamics 365 for Operations instanceshttps://ax.help.dynamics.com/en/wiki/access-microsoft-dynamics-ax-7-instances-2/
2Installation of Hyper-V and creating virtual machinehttps://technet.microsoft.com/enus/library/hh846766(v=ws.11).aspx

Update NuGet package to new MS D365FO version

1. Import the NuGet package files from LCS for that particular version please take the PU version files only. a. Goto LCS-->Asset Libra...