Welcome at schweda.net | EN | DE
These posts are machine-translated.

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



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();


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.


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


Often, a function that has been created based on the SysOperation-framework, is called from a form via a button. Therefore there is the requirement, that the displayed data should be updated in the form after execution.

I like to use the following logic. This assumes that the call of the function is done via a button and thereby the main()-method is triggered.

This refresh is done via a sub-method and could look like this:

private void refreshCallingForm(args _args)
    FormRun callerFormRun;

    if(_args && _args.caller() && _args.caller() is formRun)
        callerFormRun = _args.caller();

The following code snippet executes the "Release to warehouse" function of a load, but without generating the waves/work.

static void Job1(Args _args)
    WHSLoadPostEngine::post(whsLoadTable::find('USMF-000004', true));


Pages 1 2 3 4 ... 19 » 


RSS RSS feed
posts of the actual month
Oktober 2018
© 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.