Welcome at schweda.net | EN | DE
 
 
 
 
 
These posts are machine-translated.
Currently, only posts are displayed, which are relevant for Dynamics AX version »Dynamics AX 2012« Filter entfernen

RSS-Feed of this version

Microsoft Dynamics AX 2012 Management ShellIf you get a hotfix from Microsoft or a module from a Microsoft partner, you often only get one or more AXMODEL files. And there is often a great desire to know in advance which objects are affected by the import of this file.

Such information can be read with the Microsoft Dynamics AX 2012 Management Shell:

Get-AXModel -File 'c: empdynamicsax2012r3_cl4555332.axmodel' -Details

Here's how it looks:

Manifest                   Summary                    Elements
--------                   -------                    --------
Microsoft.Dynamics.AX.F... {Classes: 3}              {ClassesWHSLoadLineI...

If you are ever embarrassed to have to create a cost center by code, this job may serve as inspiration:

static void createCostCenter(Args _args)
{
    str 30 _costCenter = "0815"; // Cost center id to create

    OMOperatingUnit omOperatingUnit;
    NumberSeqFormHandler numberSeqFormHandler;
    NumberSeq numberSeq;

    if (_costCenter)
    {
        if (!OMOperatingUnit::findName(
            _costCenter, OMOperatingUnitType::OMCostCenter))
        {
            ttsbegin;
            numberSeq = NumberSeq::newGetNumFromId(
                OMOperatingUnit::getNumberSequenceReference().NumberSequenceId);

            omOperatingUnit.clear();

            omOperatingUnit.initValue();
            omOperatingUnit.omOperatingUnitNumber = numberSeq.num();
            omOperatingUnit.Name = _costCenter;    // Id used as name
            omOperatingUnit.NameAlias = _costCenter;
            omOperatingUnit.omOperatingUnitType = OMOperatingUnitType::OMCostCenter;
            omOperatingUnit.LanguageId = CompanyInfo::languageId();

            if (omOperatingUnit.validateWrite())
            {
                omOperatingUnit.insert();
            }
            ttscommit;
        }
    }
}

In the following scenario, all records of a temporary table are to be passed to a SysOperation construct.

For that we need:

  • In the DataContract, a accessor method (parm-method) that takes a container
  • In the controller, a logic that iterates the records of a calling data source and packs it into a container, and passes it to the service using the above method
  • In the service class we need code, which unpacks and processed the transferred container

 

Controller

class TutorialSysOperationController extends SysOperationServiceController
{
}

A common requirement in projects is that sales order lines should be created by code, such as data imports or similar.

Recently I had the request that code-generated sales order lines are then to be processed manually, but the price information such as sales price and rebate should be preserved.

However, editing certain fields in a sales order line in Dynamics AX triggers price search. This had to be prevented or pointed out to the user at least by a query. Fortunately, there is already one such query, which is controlled by the following fields:

Field Description
ManualEntryChangepolicy Reference to table PriceDiscChangePolicy
SystemEntryChangePolicy Reference to table PriceDiscChangePolicy
SystemEntrySource BaseEnum

The following snippets are meant to show how to extract the individual elements from a string with fixed separators.

Variant 1: Convert the string to a container using str2con()

static void Job1(Args _args)
{
    str paramAsStr = "Wert1@@Wert2@@Wert3";
    container paramAsCon;
    int i;

    paramAsCon = str2con(paramAsStr, "@@");
    
    for (i=1;i<=conLen(paramAsCon);i++)
    {
        info(conPeek(paramAsCon, i));    
    }
}


Variant 2: Convert the string to a list using strSplit()

static void Job1(Args _args)
{
    str paramAsStr = "Value 1|Value 2|Value 3";
    List paramAsList;
    ListEnumerator le;

    paramAsList = strSplit(paramAsStr, "|");
    
    le = paramAsList.getEnumerator();
    while(le.moveNext())
    {
        info(le.current());    
    }
}

 


The following snippet shows how to build waves and work for one ore more delivery through code. This will usually happen if you use the "Release to warehouse" function.

WHSWaveTable::buildWaveFromShipments(['USMF-000006','USMF-000007']);

Recently, I wanted to update my locally installed AX 2012 R3 CU8 to a newer version. This requires the following:

  • Access to Lifecycle Services (LCS)
  • At least a couple of hours

Below are some screenshots and comments I made during the update.

Log in to LCS and download the installer

Screenshot


Pages 1 2 3 4 ... 18 » 

 

 
Feeds
RSS RSS feed
 
 
posts of the actual month
Dezember 2018
MoDiMiDoFrSaSo
 12
3456789
10111213141516
17181920212223
24252627282930
31 
 
 
© 2006-2018 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.