<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="https://www.schweda.net/style_feed.css" ?>
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
    xmlns:atom="http://www.w3.org/2005/Atom"	
	xmlns:dc="http://purl.org/dc/elements/1.1/" > 
<channel>
    <title>schweda.net - Blog</title>
    <link>https://www.schweda.net/</link>
    <description>schweda.net - Blog - Blog-Beitraege</description>
    <language>de-at</language>
    <copyright>Copyright 2006-2026</copyright>
    <generator>schweda.net</generator>
    <managingEditor>heinz.schweda@schweda.net (Heinz Schweda)</managingEditor>
    <webMaster>heinz.schweda@schweda.net (Heinz Schweda)</webMaster>
    <category>Blog</category>
	<atom:link href="https://www.schweda.net/blog_rss.php?cid=7&amp;wdl=en" rel="self" type="application/rss+xml" />
<item>
<title><![CDATA["OpenPrinter" error when displaying a report on the screen]]></title>
<description><![CDATA[
<p>If the following error occurs when displaying a report on the screen, you must set up a default printer in Windows.
</p>


<p>OpenPrinter_1: rc:0 LastError:3012(0xbc4) No printer were found.
</p>]]></description>
<category>Microsoft Dynamics AX (Axapta)</category>
<pubDate>Wed, 16 Feb 2022 10:58:00 +0100</pubDate>
<link>https://www.schweda.net/blog_ax.php?bid=706&amp;wdl=en</link>
<comments>https://www.schweda.net/blog_ax.php?bid=706&amp;wdl=en</comments>
<guid isPermaLink="true">https://www.schweda.net/blog_ax.php?bid=706&amp;wdl=en</guid>
<author>heinz.schweda@schweda.net (Heinz Schweda)</author>
<wfw:commentRss>https://www.schweda.net/blog_ax.php?bid=706&amp;wdl=en</wfw:commentRss>
</item>
<item>
<title><![CDATA[Picking list registration of a sales order by code]]></title>
<description><![CDATA[
<div class="div_table_100_wo_border">

<div class="div_tablerow">

<div class="div_tablecolumn" style="padding-right:10px">

<p>The code example below shows how you can use code to post an entry for a picking list (assuming that all necessary information such as the picking location has already been entered).
</p>

</div>


<div class="div_tablecolumn" style="width:40%">

<p><a href="http://www.schweda.net/pictures/blogpics/ax2012_salespickinglist_register.png" rel="lightbox" target="_self"><img alt="Screenshot" height="166" src="http://www.schweda.net/pictures/blogpics/ax2012_salespickinglist_register.png" title="Screenshot" width="396" /></a>
</p>

</div>

</div>

</div>


<pre class="pre_blog_axcode">
static void pickingListRegistration(Args _args)
{
    WMSPickingRouteID pickingRouteID = &quot;00061&quot;;    // Route id to be picked
    List list = new List(Types::String);

    list.addEnd(pickingRouteID);

    WMSPickingRoute::finishMulti(list.pack());

    wmsDeliverPickedItems::checkDeliverPickedItems(pickingRouteID, list.pack());
}
</pre>


<p>&nbsp;
</p>]]></description>
<category>Microsoft Dynamics AX (Axapta)</category>
<pubDate>Mon, 27 Apr 2020 10:30:00 +0200</pubDate>
<link>https://www.schweda.net/blog_ax.php?bid=530&amp;wdl=en</link>
<comments>https://www.schweda.net/blog_ax.php?bid=530&amp;wdl=en</comments>
<guid isPermaLink="true">https://www.schweda.net/blog_ax.php?bid=530&amp;wdl=en</guid>
<author>heinz.schweda@schweda.net (Heinz Schweda)</author>
<wfw:commentRss>https://www.schweda.net/blog_ax.php?bid=530&amp;wdl=en</wfw:commentRss>
</item>
<item>
<title><![CDATA[Create picking list for specific lines in a sales order]]></title>
<description><![CDATA[
<div class="div_table_100_wo_border">

<div class="div_tablerow">

<div class="div_tablecolumn" style="padding-right:10px">

<p>I do not know how to create a picking list by code only for certain order items.
</p>


<p>Therefore I use the following approach:
</p>


<p>I create the pick list using the SalesFormLetter framework and before the decisive step (executing the run() method) I delete those entries in the SalesParmLine table that I do not need.
</p>

</div>


<div class="div_tablecolumn" style="width:40%">

<p><a href="http://www.schweda.net/pictures/blogpics/ax2012_salespickinglist_create.png" rel="lightbox" target="_self"><img alt="Screenshot" height="166" src="http://www.schweda.net/pictures/blogpics/ax2012_salespickinglist_create.png" title="Screenshot" width="396" /></a>
</p>

</div>

</div>

</div>


<pre class="pre_blog_axcode">
static void createSalesPickingListSingleLine(Args _args)
{
    SalesTable salesTable = salesTable::find(&quot;001862&quot;); // Sales order
    container inventTransIdCon = [&quot;014015&quot;, &quot;014016&quot;];  // LOT-IDs to pick
    SalesFormLetter salesFormLetter;
    SalesParmLine salesParmLine;
    
    salesFormLetter = SalesFormLetter::construct(DocumentStatus::PickingList);

    // Do the steps manually, which normally are done in method
    // salesFormLetter.update()
    salesFormLetter.salesTable(salesTable);
    salesFormLetter.initParmSalesTable(salesFormLetter.salesTable());
    salesFormLetter.transDate(systemDateGet());
    salesFormLetter.specQty(SalesUpdate::All);
    salesFormLetter.proforma(salesFormLetter.salesParmUpdate().Proforma);
    salesFormLetter.printFormLetter(salesFormLetter.printFormLetter());
    salesFormLetter.printCODLabel(NoYes::No);
    salesFormLetter.printShippingLabel(NoYes::No);
    salesFormLetter.usePrintManagement(false);
    salesFormLetter.creditRemaining(salesFormLetter.creditRemaining());

    salesFormLetter.createParmUpdateFromParmUpdateRecord(
        SalesFormletterParmData::initSalesParmUpdateFormletter(
            salesFormLetter.documentStatus(),
            salesFormLetter.pack(),
            true,
            false,
            false));

    salesFormLetter.initParameters(
        salesFormLetter.salesParmUpdate(),
        Printout::Current);

    salesFormLetter.initLinesQuery();

    // Delete unwanted records in SalesParmLine
    while select forupdate salesParmLine
        where salesParmLine.ParmId == salesFormLetter.parmId()
    {
        if (conFind(inventTransIdCon, salesParmLine.InventTransId) == 0)
        {
            salesParmLine.delete();
        }
    }

    // Let&#39;s go
    salesFormLetter.run();
}
</pre>


<p>&nbsp;
</p>]]></description>
<category>Microsoft Dynamics AX (Axapta)</category>
<pubDate>Mon, 27 Apr 2020 10:30:00 +0200</pubDate>
<link>https://www.schweda.net/blog_ax.php?bid=529&amp;wdl=en</link>
<comments>https://www.schweda.net/blog_ax.php?bid=529&amp;wdl=en</comments>
<guid isPermaLink="true">https://www.schweda.net/blog_ax.php?bid=529&amp;wdl=en</guid>
<author>heinz.schweda@schweda.net (Heinz Schweda)</author>
<wfw:commentRss>https://www.schweda.net/blog_ax.php?bid=529&amp;wdl=en</wfw:commentRss>
</item>
<item>
<title><![CDATA[Create a picking list for all lines in a sales order]]></title>
<description><![CDATA[
<div class="div_table_100_wo_border">

<div class="div_tablerow">

<div class="div_tablecolumn" style="padding-right:10px">

<p>The code example below shows how to create a picking list for all lines of a sales order by code.
</p>

</div>


<div class="div_tablecolumn" style="width:40%">

<p><a href="http://www.schweda.net/pictures/blogpics/ax2012_salespickinglist_create.png" rel="lightbox" target="_self"><img alt="Screenshot" height="166" src="http://www.schweda.net/pictures/blogpics/ax2012_salespickinglist_create.png" title="Screenshot" width="396" /></a>
</p>

</div>

</div>

</div>


<pre class="pre_blog_axcode">
static void createSalesPickingList(Args _args)
{
    SalesTable salesTable = SalesTable::find(&quot;000752&quot;);
    SalesFormLetter salesFormLetter;

    salesFormLetter = SalesFormLetter::construct(DocumentStatus::PickingList);
    salesFormLetter.update(salesTable, systemDateGet(), SalesUpdate::All);
}
</pre>


<p>&nbsp;
</p>]]></description>
<category>Microsoft Dynamics AX (Axapta)</category>
<pubDate>Mon, 27 Apr 2020 10:29:00 +0200</pubDate>
<link>https://www.schweda.net/blog_ax.php?bid=528&amp;wdl=en</link>
<comments>https://www.schweda.net/blog_ax.php?bid=528&amp;wdl=en</comments>
<guid isPermaLink="true">https://www.schweda.net/blog_ax.php?bid=528&amp;wdl=en</guid>
<author>heinz.schweda@schweda.net (Heinz Schweda)</author>
<wfw:commentRss>https://www.schweda.net/blog_ax.php?bid=528&amp;wdl=en</wfw:commentRss>
</item>
<item>
<title><![CDATA[Register picking list for selected lines of a sales order]]></title>
<description><![CDATA[
<div class="div_table_100_wo_border">

<div class="div_tablerow">

<div class="div_tablecolumn" style="padding-right:10px">

<p>The code example below shows how code can be used to register a picking list and process only partial quantities.
</p>


<p>My approach is to create a separate line in the WMSOrderTrans table for the required quantity (using the Split function) and to cancel the currently not needed quantity.
</p>

</div>


<div class="div_tablecolumn" style="width:40%">

<p><a href="http://www.schweda.net/pictures/blogpics/ax2012_salespickinglist_register.png" rel="lightbox" target="_self"><img alt="Screenshot" height="166" src="http://www.schweda.net/pictures/blogpics/ax2012_salespickinglist_register.png" title="Screenshot" width="396" /></a>
</p>

</div>

</div>

</div>


<pre class="pre_blog_axcode">
static void pickingListRegistrationPartly(Args _args)
{
    WMSPickingRouteID pickingRouteID = &quot;00066&quot;;    // Route id to be picked
    Map inventTransMap = new Map(Types::String, Types::Real);
    MapEnumerator me;
    InventTransId inventTransId;
    Qty pickQty;
    List list = new List(Types::String);
    WmsOrderTrans wmsOrderTrans;
    WmsOrderTrans wmsOrderTransNew;

    list.addEnd(pickingRouteID);

    // Build map containing the lot-ids and quantity to pick
    inventTransMap.insert(&quot;014023&quot;, 7);
    inventTransMap.insert(&quot;014026&quot;, 3);
    
    // Change quantity
    me = inventTransMap.getEnumerator();
    while (me.moveNext())
    {
        inventTransId = me.currentKey();    
        pickQty = me.currentValue();
        
        ttsBegin;
        select forupdate wmsOrderTrans
            where wmsOrderTrans.RouteId == pickingRouteID &amp;&amp;
                  wmsOrderTrans.inventTransId == inventTransId &amp;&amp;
                  wmsOrderTrans.FullPallet == NoYes::No &amp;&amp;
                 (wmsOrderTrans.ExpeditionStatus == WMSExpeditionStatus::Registered ||
                  wmsOrderTrans.ExpeditionStatus == WMSExpeditionStatus::Activated  ||
                  wmsOrderTrans.ExpeditionStatus == WMSExpeditionStatus::Started);        
        
        // Split line
        wmsOrderTransNew = wmsOrderTrans.split(pickQty);        
        ttsCommit;
        
        ttsBegin;
        // Cancel remaining line
        wmsOrderTrans.cancel();
        ttsCommit;
    }
    
    // Update
    WMSPickingRoute::finishMulti(list.pack()); 

    wmsDeliverPickedItems::checkDeliverPickedItems(pickingRouteID, list.pack());
}
</pre>]]></description>
<category>Microsoft Dynamics AX (Axapta)</category>
<pubDate>Sun, 15 Mar 2020 18:02:00 +0100</pubDate>
<link>https://www.schweda.net/blog_ax.php?bid=649&amp;wdl=en</link>
<comments>https://www.schweda.net/blog_ax.php?bid=649&amp;wdl=en</comments>
<guid isPermaLink="true">https://www.schweda.net/blog_ax.php?bid=649&amp;wdl=en</guid>
<author>heinz.schweda@schweda.net (Heinz Schweda)</author>
<wfw:commentRss>https://www.schweda.net/blog_ax.php?bid=649&amp;wdl=en</wfw:commentRss>
</item>
<item>
<title><![CDATA[Extending the Context Menu of the X++ Editor in Dynamics AX 2012]]></title>
<description><![CDATA[
<div class="div_table_100_wo_border">

<div class="div_tablerow">

<div class="div_tablecolumn" style="padding-right:10px">

<p>Some years ago I had already written an article about the class <strong>EditorScripts</strong>. This is the one with which you can easily extend the functionality of the X++ editor.
</p>


<p>For example, you can easily extend the context menu of the editor by creating methods in the class.
</p>


<p>These methods only have to meet a few criteria, such as
</p>


<ul>
	
<li>The first and only parameter must be of type Editor.
</li>
	
<li>The method must be public
</li>
	
<li>The method must not return anything (void)
</li>

</ul>

</div>


<div class="div_tablecolumn" style="width:30%">

<p><a href="https://www.schweda.net/pictures/blogpics/ax2012_editorscripts_kontext.png" rel="lightbox" target="_blank"><img alt="X++-Editor" height="474" src="https://www.schweda.net/pictures/blogpics/ax2012_editorscripts_kontext.png" style="border-style:solid; border-width:0px" title="X++-Editor" width="770" /></a>
</p>

</div>

</div>

</div>

<br /><a class="div_blog_category_gotodetail" href="https://www.schweda.net/blog_ax.php?bid=667" target="_self" title="Weiterlesen...">Weiterlesen...</a>]]></description>
<category>Microsoft Dynamics AX (Axapta)</category>
<pubDate>Fri, 07 Feb 2020 07:40:00 +0100</pubDate>
<link>https://www.schweda.net/blog_ax.php?bid=667&amp;wdl=en</link>
<comments>https://www.schweda.net/blog_ax.php?bid=667&amp;wdl=en</comments>
<guid isPermaLink="true">https://www.schweda.net/blog_ax.php?bid=667&amp;wdl=en</guid>
<author>heinz.schweda@schweda.net (Heinz Schweda)</author>
<wfw:commentRss>https://www.schweda.net/blog_ax.php?bid=667&amp;wdl=en</wfw:commentRss>
</item>
<item>
<title><![CDATA[Requesting information on SSRS reports via the Microsoft Dynamics AX 2012 Management Shell]]></title>
<description><![CDATA[
<p><img alt="Microsoft Dynamics AX 2012 Management Shell" height="59" src="http://www.schweda.net/pictures/blogpics/ax2012_managementshell.png" style="float:right; padding-bottom:10px; padding-left:10px" width="258" />With the Microsoft Dynamics AX 2012 Management Shell you can get a lot of information about your Dynamics AX 2012 instance.
</p>


<p>For example, you can use the command below to display a list of all SSRS reports or just one specific report (for example, SalesInvoice).
</p>


<pre class="pre_blog_axcode">
get-AXReport -reportname *
get-AXReport -reportname salesinvoice
</pre>

<br /><a class="div_blog_category_gotodetail" href="https://www.schweda.net/blog_ax.php?bid=646" target="_self" title="Weiterlesen...">Weiterlesen...</a>]]></description>
<category>Microsoft Dynamics AX (Axapta)</category>
<pubDate>Thu, 05 Dec 2019 15:48:00 +0100</pubDate>
<link>https://www.schweda.net/blog_ax.php?bid=646&amp;wdl=en</link>
<comments>https://www.schweda.net/blog_ax.php?bid=646&amp;wdl=en</comments>
<guid isPermaLink="true">https://www.schweda.net/blog_ax.php?bid=646&amp;wdl=en</guid>
<author>heinz.schweda@schweda.net (Heinz Schweda)</author>
<wfw:commentRss>https://www.schweda.net/blog_ax.php?bid=646&amp;wdl=en</wfw:commentRss>
</item>
<item>
<title><![CDATA[Release to warehouse]]></title>
<description><![CDATA[
<div class="div_table_100_wo_border">

<div class="div_tablerow">

<div class="div_tablecolumn" style="padding-right:10px">To call the function &quot;Release to warehouse&quot; for one or more orders by code, you can use the following code.
</div>


<div class="div_tablecolumn" style="width:30%"><a href="http://www.schweda.net/pictures/blogpics/ax2012_release2warehouse4salesorders.png" rel="lightbox" target="_self"><img alt="Screenshot" height="147" src="http://www.schweda.net/pictures/blogpics/ax2012_release2warehouse4salesorders.png" title="Screenshot" width="294" /></a>
</div>

</div>

</div>


<pre class="pre_blog_axcode">
static void releaseToWareHouse(Args _args)
{
    SalesTable salesTale = SalesTable::find(&#39;002162&#39;);
    CustCreditMaxCheck creditMaxCheck;
    List listSalesTable = new List(Types::Record);
    container packedData;
    
    // Release to warehouse
    creditMaxCheck = WHSParameters::getCreditMaxCheck();
    listSalesTable.addEnd(salesTale);

    // Must use value of enum when going through IL
    packedData = [enum2int(creditMaxCheck), listSalesTable.pack()];

    WHSWarehouseRelease::salesFormReleaseCallCIL(packedData);
}
</pre>


<p>&nbsp;
</p>]]></description>
<category>Microsoft Dynamics AX (Axapta)</category>
<pubDate>Thu, 24 Oct 2019 08:19:00 +0200</pubDate>
<link>https://www.schweda.net/blog_ax.php?bid=658&amp;wdl=en</link>
<comments>https://www.schweda.net/blog_ax.php?bid=658&amp;wdl=en</comments>
<guid isPermaLink="true">https://www.schweda.net/blog_ax.php?bid=658&amp;wdl=en</guid>
<author>heinz.schweda@schweda.net (Heinz Schweda)</author>
<wfw:commentRss>https://www.schweda.net/blog_ax.php?bid=658&amp;wdl=en</wfw:commentRss>
</item>
<item>
<title><![CDATA[Entry "RPC exception 1702 occurred" in the event log]]></title>
<description><![CDATA[
<blockquote>

<p>Object Server 01: &nbsp;RPC error: RPC exception 1702 occurred in session 4 process is Ax32Serv.exe thread is 8788(User: admin, ClientType: Worker)
</p>

</blockquote>


<p>This entry may indicate the use of client-side code on the server, such as calling a WinApi function from a batch job.
</p>


<p>It can also be triggered by calling info(), Warning() or error() within a batch job, if the option &quot;Enable global breakpoint&quot; is enabled at the respective AOS.
</p>


<p><a href="https://www.schweda.net/pictures/blogpics/ax2012_eventlog_rpc_1702.png" rel="lightbox" target="_blank"><img alt="Screenshot AX 2012 Server Configuration Utility" height="394" src="https://www.schweda.net/pictures/blogpics/ax2012_eventlog_rpc_1702.png" style="border-style:solid; border-width:0px" title="Screenshot AX 2012 Server Configuration Utility" width="841" /></a>
</p>]]></description>
<category>Microsoft Dynamics AX (Axapta)</category>
<pubDate>Tue, 15 Oct 2019 15:37:00 +0200</pubDate>
<link>https://www.schweda.net/blog_ax.php?bid=668&amp;wdl=en</link>
<comments>https://www.schweda.net/blog_ax.php?bid=668&amp;wdl=en</comments>
<guid isPermaLink="true">https://www.schweda.net/blog_ax.php?bid=668&amp;wdl=en</guid>
<author>heinz.schweda@schweda.net (Heinz Schweda)</author>
<wfw:commentRss>https://www.schweda.net/blog_ax.php?bid=668&amp;wdl=en</wfw:commentRss>
</item>
<item>
<title><![CDATA[SQL error when synchronizing after updating from AX 2012 to CU13]]></title>
<description><![CDATA[
<p>During the upgrade of an AX 2012 R3 CU9 instance to CU13 (February release) I had the following error at the point Synchronize database of the upgrade checklist:
</p>


<blockquote>

<p>SQL error description: [Microsoft][SQL Server Native Client 11.0][SQL Server]The CREATE UNIQUE INDEX statement terminated because a duplicate key was found for the object name &#39;dbo.LEDGERPERIODMODULEACCESSCONTROL&#39; and the index name &#39;I_7375LEDGERFISCALCALENDARPERIODIDX&#39;. The duplicate key value is (5637144576, 22565421332).
</p>


<p>SQL statement: CREATE UNIQUE &nbsp;INDEX I_7375LEDGERFISCALCALENDARPERIODIDX ON &quot;DBO&quot;.LEDGERPERIODMODULEACCESSCONTROL (PARTITION,LEDGERFISCALCALENDARPERIOD)
</p>

</blockquote>


<p>The solution is to leave this error for now and start with the next step of the checklist, the data upgrade. One of the jobs to be executed cleans up the data records that lead to the error.
</p>


<p>After the data upgrade, the database can now be synchronized without errors.
</p>


<p><a href="https://www.schweda.net/pictures/blogpics/ax2012_softwareupdatechecklist_sync.png" rel="lightbox" target="_blank"><img alt="Screenshot" height="673" src="https://www.schweda.net/pictures/blogpics/ax2012_softwareupdatechecklist_sync.png" style="border-style:solid; border-width:0px" title="Screenshot" width="403" /></a><br />
&nbsp;
</p>]]></description>
<category>Microsoft Dynamics AX (Axapta)</category>
<pubDate>Sun, 13 Oct 2019 18:09:00 +0200</pubDate>
<link>https://www.schweda.net/blog_ax.php?bid=669&amp;wdl=en</link>
<comments>https://www.schweda.net/blog_ax.php?bid=669&amp;wdl=en</comments>
<guid isPermaLink="true">https://www.schweda.net/blog_ax.php?bid=669&amp;wdl=en</guid>
<author>heinz.schweda@schweda.net (Heinz Schweda)</author>
<wfw:commentRss>https://www.schweda.net/blog_ax.php?bid=669&amp;wdl=en</wfw:commentRss>
</item>
<item>
<title><![CDATA[SysOperation-Framework: Controlling ExecutionMode and server method to be executed using the MenuItem]]></title>
<description><![CDATA[
<p>If you want to control the <strong>SysOperationExecutionMode</strong> and/or the server method to be executed via the MenuItem in a SysOperation construct, you can control this via the properties of the MenuItem.
</p>


<h2>Scenario: Without own controller
</h2>


<p>The following two MenuItems show how to set the properties for them:
</p>


<p>This MenuItem calls the <em>runService()</em> method of a service class and sets the <em>SysOperationExecutionMode</em> to <em>Synchronous</em>:
</p>


<p><a href="http://www.schweda.net/pictures/blogpics/ax2012_sysoperation_tutmenuitem_ctrlsync.png" rel="lightbox" target="_self"><img alt="Screenshot" height="230" src="http://www.schweda.net/pictures/blogpics/ax2012_sysoperation_tutmenuitem_ctrlsync.png" title="Screenshot" width="482" /></a>
</p>

<br /><a class="div_blog_category_gotodetail" href="https://www.schweda.net/blog_ax.php?bid=657" target="_self" title="Weiterlesen...">Weiterlesen...</a>]]></description>
<category>Microsoft Dynamics AX (Axapta)</category>
<pubDate>Tue, 24 Sep 2019 17:16:00 +0200</pubDate>
<link>https://www.schweda.net/blog_ax.php?bid=657&amp;wdl=en</link>
<comments>https://www.schweda.net/blog_ax.php?bid=657&amp;wdl=en</comments>
<guid isPermaLink="true">https://www.schweda.net/blog_ax.php?bid=657&amp;wdl=en</guid>
<author>heinz.schweda@schweda.net (Heinz Schweda)</author>
<wfw:commentRss>https://www.schweda.net/blog_ax.php?bid=657&amp;wdl=en</wfw:commentRss>
</item>
<item>
<title><![CDATA[SysOperation-Framework: Force Batch Processing]]></title>
<description><![CDATA[
<p>If you want to make sure that a function implemented via the <strong>SysOperation-framework</strong> is always executed via batch processing, you can set the <em>SysOperationExecutionMode</em> to <em>ScheduledBatch</em> (e.g. via the MenuItem of the controller - see&nbsp;<a href="http://www.schweda.net/blog_ax.php?bid=657&amp;wdl=en" target="_self" title="SysOperation-Framework: ExecutionMode und auszuführende Servermethode über das MenuItem steuern">here</a>).
</p>


<p>If this is a function that requires a user dialog, however, the problem is that the &quot;Batch&quot; tab is displayed by default and, for example, the &quot;Batch&quot; check box is not activated there.
</p>


<p>Of course you can activate this checkbox by including a call to <em>parmBatchExecute()</em> in the UIBuilder:
</p>


<pre class="pre_blog_axcode">
public void build()
{
    super();

    this.controller().batchInfo().parmBatchExecute(this.controller().parmExecutionMode() == SysOperationExecutionMode::ScheduledBatch);
}
</pre>

<br /><a class="div_blog_category_gotodetail" href="https://www.schweda.net/blog_ax.php?bid=656" target="_self" title="Weiterlesen...">Weiterlesen...</a>]]></description>
<category>Microsoft Dynamics AX (Axapta)</category>
<pubDate>Fri, 13 Sep 2019 14:29:00 +0200</pubDate>
<link>https://www.schweda.net/blog_ax.php?bid=656&amp;wdl=en</link>
<comments>https://www.schweda.net/blog_ax.php?bid=656&amp;wdl=en</comments>
<guid isPermaLink="true">https://www.schweda.net/blog_ax.php?bid=656&amp;wdl=en</guid>
<author>heinz.schweda@schweda.net (Heinz Schweda)</author>
<wfw:commentRss>https://www.schweda.net/blog_ax.php?bid=656&amp;wdl=en</wfw:commentRss>
</item>
<item>
<title><![CDATA[Creating and posting a free text invoice by code]]></title>
<description><![CDATA[
<p>The following job shows how to create and post a free text invoice by code.
</p>


<pre class="pre_blog_axcode">
static void createAndPostFreeTextInvoice(Args _args)
{
    CustInvoiceTable custInvoiceTable;
    CustInvoiceLine custInvoiceLine;
    DimensionDefault dimensionDefault; 
    LedgerDimensionAccount ledgerDimensionAccount;     
    CustPostInvoice custPostInvoice;
    
    try
    {
        ttsBegin;        
        
        // Create header
        custInvoiceTable.clear();
        custInvoiceTable.initValue();
        custInvoiceTable.OrderAccount = &quot;US-004&quot;;
        custInvoiceTable.modifiedField(
            fieldNum(CustInvoiceTable, OrderAccount));
        custInvoiceTable.insert();
        
        // Create line
        custInvoiceLine.clear();
        custInvoiceLine.initValue();
        custInvoiceLine.ParentRecId = custInvoiceTable.RecId;
        custInvoiceLine.initFromCustInvoiceTable(custInvoiceTable);
        custInvoiceLine.Description = &quot;Test&quot;;
        custInvoiceLine.Quantity = 10;
        custInvoiceLine.modifiedField(
            fieldNum(CustInvoiceLine, Quantity));
        custInvoiceLine.UnitPrice = 200;
        custInvoiceLine.modifiedField(
            fieldNum(CustInvoiceLine, UnitPrice));
        
        ledgerDimensionAccount = 
        DimensionDefaultingService::serviceCreateLedgerDimension(
            DimensionStorage::getDefaultAccountForMainAccountNum(
                &quot;110110&quot;), 
                dimensionDefault); 
        
        custInvoiceLine.LedgerDimension = ledgerDimensionAccount;
        custInvoiceLine.modifiedField(
            fieldNum(CustInvoiceLine, LedgerDimension));
        custInvoiceLine.insert();
        
        // Post
        custPostInvoice = new CustPostInvoice(custInvoiceTable);
        custPostInvoice.run();
        
        ttsCommit;
    }
    catch
    {
        throw error(error::wrongUseOfFunction(funcName()));
    }
}
</pre>


<p>This is what a free text invoice looks like:
</p>


<p><a href="http://www.schweda.net/pictures/blogpics/ax2012_freetextinvoice.png" rel="lightbox"><img alt="Screenshot Freetext invoice" height="633" src="http://www.schweda.net/pictures/blogpics/ax2012_freetextinvoice.png" title="Screenshot" width="1024" /></a>
</p>]]></description>
<category>Microsoft Dynamics AX (Axapta)</category>
<pubDate>Sat, 07 Sep 2019 19:27:00 +0200</pubDate>
<link>https://www.schweda.net/blog_ax.php?bid=644&amp;wdl=en</link>
<comments>https://www.schweda.net/blog_ax.php?bid=644&amp;wdl=en</comments>
<guid isPermaLink="true">https://www.schweda.net/blog_ax.php?bid=644&amp;wdl=en</guid>
<author>heinz.schweda@schweda.net (Heinz Schweda)</author>
<wfw:commentRss>https://www.schweda.net/blog_ax.php?bid=644&amp;wdl=en</wfw:commentRss>
</item>
<item>
<title><![CDATA[Debugging SSRS-Dataprovider which extends SrsReportDataProviderPreProce]]></title>
<description><![CDATA[
<p>In <a href="http://www.schweda.net/blog_ax.php?bid=591" target="_self" title="Debugging SSRS-Dataprovider">Debugging SSRS-Dataprovider</a> I have already described how to &quot;debug&quot; a DataProvider derived from SRSReportDataProviderBase.
</p>


<p>The following job basically does the same, but for preprocessed reports, where the DataProvider is derived from <strong>SrsReportDataProviderPreProcess</strong>. In the example, I use the DataProvider of an invoice (SalesInvoice).
</p>


<pre class="pre_blog_axcode">
static void testSSRSDataProvider_SalesInvoice(Args _args)
{
    SalesInvoiceTmp salesInvoiceTmp;
    SalesInvoiceDP dataProvider = new SalesInvoiceDP();
    SalesInvoiceContract contract;
    CustInvoiceJour CustInvoiceJour = CustInvoiceJour::findRecId(35637191172);
    UserConnection UserConnection;

    try
    {
        ttsBegin;

        UserConnection = new UserConnection();

        contract = new SalesInvoiceContract();
        contract.parmFormLetterRecordId(CustInvoiceJour.RecId);
        contract.parmRecordId(CustInvoiceJour.RecId);

        dataProvider = new SalesInvoiceDP();
        dataProvider.parmDataContract(contract);
        dataProvider.parmUserConnection(UserConnection);
        dataProvider.processReport();

        salesInvoiceTmp = dataProvider.getSalesInvoiceTmp();
        
        while select salesInvoiceTmp
            where SalesInvoiceTmp.createdTransactionId == appl.curTransactionId()
        {
            info(strFmt(&quot;%1 %2&quot;, SalesInvoiceTmp.InvoiceId, SalesInvoiceTmp.ItemId));
        }

        ttsCommit;
    }
    catch (Exception::Break)
    {
        info(&quot;Aborted&quot;);
    }
}
</pre>


<p>&nbsp;
</p>]]></description>
<category>Microsoft Dynamics AX (Axapta)</category>
<pubDate>Mon, 10 Jun 2019 19:51:00 +0200</pubDate>
<link>https://www.schweda.net/blog_ax.php?bid=652&amp;wdl=en</link>
<comments>https://www.schweda.net/blog_ax.php?bid=652&amp;wdl=en</comments>
<guid isPermaLink="true">https://www.schweda.net/blog_ax.php?bid=652&amp;wdl=en</guid>
<author>heinz.schweda@schweda.net (Heinz Schweda)</author>
<wfw:commentRss>https://www.schweda.net/blog_ax.php?bid=652&amp;wdl=en</wfw:commentRss>
</item>
<item>
<title><![CDATA[Pick a reserved sales order line by code]]></title>
<description><![CDATA[
<p>To pick the quantities already reserved from an sales order item by code, you can use codes such as the following:
</p>


<pre class="pre_blog_axcode">
static void JobPick(Args _args)
{
    Query inventTransQuery;
    QueryRun qr;
    QueryBuildDataSource qbds;
    InventTrans inventTrans;
    InventDim inventDim;
    InventTransOrigin inventTransOrigin;
    TmpInventTransWMS tmpInventTransWMS;
    InventTransWMS_Pick inventTransWMS_Pick;
    SalesLine salesLine = SalesLine::findInventTransId(&#39;014417&#39;);
    
    inventTransQuery = new Query();
    qbds = inventTransQuery.addDataSource(tableNum(InventTrans));
    qbds.addRange(fieldNum(InventTrans, StatusIssue)).value(queryValue(StatusIssue::ReservPhysical));
    qbds = qbds.addDataSource(tableNum(InventTransOrigin));
    qbds.relations(true);
    qbds.joinMode(JoinMode::InnerJoin);
    qbds.addRange(fieldNum(InventTransOrigin, InventTransId)).value(salesLine.InventTransId);
    
    qr = new QueryRun(inventTransQuery);
    while (qr.next())
    {
        inventTrans = qr.get(tableNum(InventTrans));
        inventTransOrigin = qr.get(tableNum(InventTransOrigin));
        
        // Set inventory dimensions for picking
        inventDim = inventDim::find(inventTrans.InventDimId);
        inventDim.wmslocationId = &quot;06A01R3S1B&quot;;   
        inventDim.LicensePlateId = &quot;LP_61_A0001&quot;;
        inventDim = inventDim::findOrCreate(inventDim);
        
        tmpInventTransWMS.clear();
        
        inventTransWMS_Pick = InventTransWMS_Pick::newStandard(tmpInventTransWMS, inventTransQuery);
        
        tmpInventTransWMS.initFromInventTrans(InventTrans);
        tmpInventTransWMS.initFromInventTransOrigin(inventTransOrigin);
        tmpInventTransWMS.initFromInventDim(inventDim);
        
        tmpInventTransWMS.InventQty = -inventTrans.Qty;
        
        inventTransWMS_Pick.writeTmpInventTransWMS(tmpInventTransWMS);
        inventTransWMS_Pick.updateInvent();    
    }
}

</pre>]]></description>
<category>Microsoft Dynamics AX (Axapta)</category>
<pubDate>Fri, 26 Apr 2019 19:50:00 +0200</pubDate>
<link>https://www.schweda.net/blog_ax.php?bid=659&amp;wdl=en</link>
<comments>https://www.schweda.net/blog_ax.php?bid=659&amp;wdl=en</comments>
<guid isPermaLink="true">https://www.schweda.net/blog_ax.php?bid=659&amp;wdl=en</guid>
<author>heinz.schweda@schweda.net (Heinz Schweda)</author>
<wfw:commentRss>https://www.schweda.net/blog_ax.php?bid=659&amp;wdl=en</wfw:commentRss>
</item>
<item>
<title><![CDATA[Impact Analysis Tool fails when deleting the baseline database]]></title>
<description><![CDATA[
<p>Recently when running the Impact Analysis Tool I had the problem that the installer seemed to have a problem deleting the baseline database and stopped/handled at this point. By the way, there was no entry in the event log.
</p>


<p><a href="http://www.schweda.net/pictures/blogpics/ax2012_impactanalysis_baselinedelete.png" rel="lightbox" target="_self"><img alt="Screenshot Impact Analysis Tool" height="585" src="http://www.schweda.net/pictures/blogpics/ax2012_impactanalysis_baselinedelete.png" title="Screenshot Impact Analysis Tool" width="1055" /></a>
</p>


<p>Interestingly, I also couldn&#39;t see the properties of the baseline database via SQL Server Management Studio, and the following error occurred:
</p>


<blockquote>

<p>Property Size is not available for Database &#39;[AX2012R3_Baseline]&#39;. This property may not exist for this object, or may not be retrievable due to insufficient access rights. &nbsp;(Microsoft.SqlServer.Smo)
</p>

</blockquote>


<p>So I have suspected that the database is broken in some way. Therefore I simply tried to re-initialize the baseline database via AXUTIL, which finally fixed my bug:
</p>


<pre class="pre_blog_sqlcode">
axutil schema /DB:AX2012R3_Baseline /S:MyServerName
</pre>


<p>After initializing the database I was able to start the Impact Analysis Tool without any problems.
</p>]]></description>
<category>Microsoft Dynamics AX (Axapta)</category>
<pubDate>Mon, 22 Apr 2019 16:56:00 +0200</pubDate>
<link>https://www.schweda.net/blog_ax.php?bid=663&amp;wdl=en</link>
<comments>https://www.schweda.net/blog_ax.php?bid=663&amp;wdl=en</comments>
<guid isPermaLink="true">https://www.schweda.net/blog_ax.php?bid=663&amp;wdl=en</guid>
<author>heinz.schweda@schweda.net (Heinz Schweda)</author>
<wfw:commentRss>https://www.schweda.net/blog_ax.php?bid=663&amp;wdl=en</wfw:commentRss>
</item>
<item>
<title><![CDATA[SysOperation-Framework: Usage data per MenuItem]]></title>
<description><![CDATA[
<p>Imagine you have a function build using the SysOperation framework that can be called at different places in the system, and you want to make sure that these calls do not share the same usage data.
</p>


<p>In such a case you could create two (or more) MenuItems and override the method <em>lastValueDesignName()</em> of the controller as follows. This will store separate usage data for each MenuItem.
</p>


<pre class="pre_blog_axcode">
protected IdentifierName lastValueDesignName()
{
    IdentifierName ret;

    ret = super();

    if (this.parmArgs() &amp;&amp; this.parmArgs().menuItemName())
    {
        ret = this.parmArgs().menuItemName();   
    }

    return ret;
}
</pre>

<br /><a class="div_blog_category_gotodetail" href="https://www.schweda.net/blog_ax.php?bid=660" target="_self" title="Weiterlesen...">Weiterlesen...</a>]]></description>
<category>Microsoft Dynamics AX (Axapta)</category>
<pubDate>Wed, 10 Apr 2019 17:27:00 +0200</pubDate>
<link>https://www.schweda.net/blog_ax.php?bid=660&amp;wdl=en</link>
<comments>https://www.schweda.net/blog_ax.php?bid=660&amp;wdl=en</comments>
<guid isPermaLink="true">https://www.schweda.net/blog_ax.php?bid=660&amp;wdl=en</guid>
<author>heinz.schweda@schweda.net (Heinz Schweda)</author>
<wfw:commentRss>https://www.schweda.net/blog_ax.php?bid=660&amp;wdl=en</wfw:commentRss>
</item>
<item>
<title><![CDATA[Query/QueryRun using a temporary table]]></title>
<description><![CDATA[
<p>If you want to run through the contents of a temporary table with a QueryRun, you have to use the method <em>setRecord()</em> of the QueryRun object.
</p>


<h2>Simple example
</h2>


<pre class="pre_blog_axcode">
static void Job1(Args _args)
{
    TmpFrmVirtual tmpFrmVirtual;
    InventTable inventTable;
    Query q;
    QueryRun qr;
    QueryBuildDataSource qbds1, qbds2;
    
    TmpFrmVirtual populateTmpFrmVirtual()
    {
        TmpFrmVirtual tmpFrmVirtualLocal;    
        
        tmpFrmVirtualLocal.clear();
        tmpFrmVirtualLocal.ItemId = &quot;A0001&quot;;
        tmpFrmVirtualLocal.insert();
        
        tmpFrmVirtualLocal.clear();
        tmpFrmVirtualLocal.ItemId = &quot;A0002&quot;;
        tmpFrmVirtualLocal.insert();        
        
        tmpFrmVirtualLocal.clear();
        tmpFrmVirtualLocal.ItemId = &quot;A0003&quot;;
        tmpFrmVirtualLocal.insert();          
        
        return tmpFrmVirtualLocal;
    }
    
    q = new Query();
    qbds1 = q.addDataSource(tableNum(TmpFrmVirtual));
    
    qr = new QueryRun(q);
    qr.setRecord(populateTmpFrmVirtual());
    while (qr.next())
    {
        tmpFrmVirtual = qr.get(tableNum(tmpFrmVirtual));    
        
        info(tmpFrmVirtual.ItemId);
    }  
}
</pre>

<br /><a class="div_blog_category_gotodetail" href="https://www.schweda.net/blog_ax.php?bid=662" target="_self" title="Weiterlesen...">Weiterlesen...</a>]]></description>
<category>Microsoft Dynamics AX (Axapta)</category>
<pubDate>Sun, 24 Mar 2019 18:33:00 +0100</pubDate>
<link>https://www.schweda.net/blog_ax.php?bid=662&amp;wdl=en</link>
<comments>https://www.schweda.net/blog_ax.php?bid=662&amp;wdl=en</comments>
<guid isPermaLink="true">https://www.schweda.net/blog_ax.php?bid=662&amp;wdl=en</guid>
<author>heinz.schweda@schweda.net (Heinz Schweda)</author>
<wfw:commentRss>https://www.schweda.net/blog_ax.php?bid=662&amp;wdl=en</wfw:commentRss>
</item>
<item>
<title><![CDATA[Filter a FormdataSource by financial dimensions]]></title>
<description><![CDATA[
<p>If you only want to display data records of a table that contain certain financial dimensions in a form, you can do this by overwriting the <em>init()</em> of the FormDataSource as follows:
</p>


<pre class="pre_blog_axcode">
public void init()
{
    super();
    
    SysQuery::addDimensionAttributeRange(salesTable_ds.query(),
                        salesTable_ds.name(),
                        fieldStr(Salestable, DefaultDimension),
                        DimensionComponent::DimensionAttribute,
                        &#39;1001&#39;,
                        &#39;CostCenter&#39;);    
}
</pre>


<p>You can also call <em>addDimensionAttributeRange()</em> multiple times, so you can filter for multiple dimensions simultaneously.
</p>


<p><em>clearDimensionRangesFromQuery()</em> removes such filters:
</p>


<pre class="pre_blog_axcode">
SysQuery::clearDimensionRangesFromQuery(salesTable_ds.query())
</pre>


<p>&nbsp;
</p>]]></description>
<category>Microsoft Dynamics AX (Axapta)</category>
<pubDate>Fri, 08 Mar 2019 18:18:00 +0100</pubDate>
<link>https://www.schweda.net/blog_ax.php?bid=661&amp;wdl=en</link>
<comments>https://www.schweda.net/blog_ax.php?bid=661&amp;wdl=en</comments>
<guid isPermaLink="true">https://www.schweda.net/blog_ax.php?bid=661&amp;wdl=en</guid>
<author>heinz.schweda@schweda.net (Heinz Schweda)</author>
<wfw:commentRss>https://www.schweda.net/blog_ax.php?bid=661&amp;wdl=en</wfw:commentRss>
</item>
<item>
<title><![CDATA[Create batch job with multiple tasks by code]]></title>
<description><![CDATA[
<p>The code snippets below show how to create batch jobs using the BatchHeader class.
</p>


<h2>Examples for a RunBaseBatch construct
</h2>


<pre class="pre_blog_axcode">
static void createBatchWithMultipletasks(Args _args)
{
    BatchHeader batchHeader;
    Tutorial_RunbaseBatch batchTask1, batchTask2, batchTask3;

    //create batch header
    batchHeader = BatchHeader::construct();
    batchHeader.parmCaption(&quot;Example of a batch job with multiple tasks&quot;);

    //create instances of the classes to use as batch tasks
    batchTask1 = Tutorial_RunbaseBatch::construct();
    batchTask2 = Tutorial_RunbaseBatch::construct();
    batchTask3 = Tutorial_RunbaseBatch::construct();

    //add the batch tasks to the batch header
    batchHeader.addTask(batchTask1);
    batchHeader.addTask(batchTask2);
    batchHeader.addTask(batchTask3);

    //save the batch
    batchHeader.save();
}
</pre>

<br /><a class="div_blog_category_gotodetail" href="https://www.schweda.net/blog_ax.php?bid=654" target="_self" title="Weiterlesen...">Weiterlesen...</a>]]></description>
<category>Microsoft Dynamics AX (Axapta)</category>
<pubDate>Wed, 13 Feb 2019 19:25:00 +0100</pubDate>
<link>https://www.schweda.net/blog_ax.php?bid=654&amp;wdl=en</link>
<comments>https://www.schweda.net/blog_ax.php?bid=654&amp;wdl=en</comments>
<guid isPermaLink="true">https://www.schweda.net/blog_ax.php?bid=654&amp;wdl=en</guid>
<author>heinz.schweda@schweda.net (Heinz Schweda)</author>
<wfw:commentRss>https://www.schweda.net/blog_ax.php?bid=654&amp;wdl=en</wfw:commentRss>
</item>
<item>
<title><![CDATA[Post the outgoing invoice by code, selecting only certain order lines and adjusting the quantity if necessary]]></title>
<description><![CDATA[
<p>Using the following code, you can post a sales invoice for a particular sales order and process only selected lines.<br />
The trick is to use the standard functionality of the <em>initLinesQuery()</em> method to create the <em>SalesParmLine </em>table and modify these data records before posting. For example, by deleting entire data records from the <em>SalesParmLine</em>.
</p>


<pre class="pre_blog_axcode">
static void createSalesInvoiceSelectLines(Args _args)
{
    SalesTable salesTable = SalesTable::find(&#39;001562&#39;);
    SalesFormLetter salesFormLetter;
    SalesParmLine salesParmLine;
    
    setPrefix(funcName());
    
    salesFormLetter = SalesFormLetter::construct(DocumentStatus::Invoice);

    // Do the steps manually, which normally are done in method salesFormLetter.update()
    salesFormLetter.salesTable(salesTable);
    salesFormLetter.initParmSalesTable(salesFormLetter.salesTable());
    salesFormLetter.transDate(systemDateGet());
    salesFormLetter.specQty(SalesUpdate::All);
    salesFormLetter.proforma(salesFormLetter.salesParmUpdate().Proforma);
    salesFormLetter.printFormLetter(salesFormLetter.printFormLetter());
    salesFormLetter.printCODLabel(NoYes::No);
    salesFormLetter.printShippingLabel(NoYes::No);
    salesFormLetter.usePrintManagement(false);
    salesFormLetter.creditRemaining(salesFormLetter.creditRemaining());

    salesFormLetter.createParmUpdateFromParmUpdateRecord(
        SalesFormletterParmData::initSalesParmUpdateFormletter(
            salesFormLetter.documentStatus(),                   
            salesFormLetter.pack(),                                                                                                                
            true,                                                                                                                
            false,                                                                                                                
            false));

    salesFormLetter.initParameters(salesFormLetter.salesParmUpdate(), Printout::Current);

    salesFormLetter.initLinesQuery();
    
    while select forupdate salesParmLine
        where salesParmLine.ParmId == salesFormLetter.parmId()
    {
        setPrefix(#PrefixField(salesParmLine, InventTransId));
        
        // ...Modify record/Delete record...
    }

    // Let&#39;s go
    if (salesFormLetter.validate(null))
    {
        salesFormLetter.run();
    }
}
</pre>


<p>&nbsp;
</p>]]></description>
<category>Microsoft Dynamics AX (Axapta)</category>
<pubDate>Sun, 03 Feb 2019 18:18:00 +0100</pubDate>
<link>https://www.schweda.net/blog_ax.php?bid=655&amp;wdl=en</link>
<comments>https://www.schweda.net/blog_ax.php?bid=655&amp;wdl=en</comments>
<guid isPermaLink="true">https://www.schweda.net/blog_ax.php?bid=655&amp;wdl=en</guid>
<author>heinz.schweda@schweda.net (Heinz Schweda)</author>
<wfw:commentRss>https://www.schweda.net/blog_ax.php?bid=655&amp;wdl=en</wfw:commentRss>
</item>
<item>
<title><![CDATA[SysOperation-Framework: Simplest class construct]]></title>
<description><![CDATA[
<p>The code below is the simplest way to implement a function using the SysOperation framework. Without DataController, Dataprovider and UIBuilder. Only with&nbsp;a service class and a MenuItem.
</p>


<h2>Service
</h2>


<pre class="pre_blog_axcode">
class TutorialSysOperationSimpleService extends SysOperationServiceBase
{
}
</pre>


<p>The <em>runService()</em> method is the actual service method. The <em>SysEntryPointAttribute </em>attribute controls that no further authorization checks are necessary.
</p>


<pre class="pre_blog_axcode">
[SysEntryPointAttribute(false)]
public void runService()
{
    info(&quot;Done&quot;);
}
</pre>

<br /><a class="div_blog_category_gotodetail" href="https://www.schweda.net/blog_ax.php?bid=653" target="_self" title="Weiterlesen...">Weiterlesen...</a>]]></description>
<category>Microsoft Dynamics AX (Axapta)</category>
<pubDate>Wed, 30 Jan 2019 17:54:00 +0100</pubDate>
<link>https://www.schweda.net/blog_ax.php?bid=653&amp;wdl=en</link>
<comments>https://www.schweda.net/blog_ax.php?bid=653&amp;wdl=en</comments>
<guid isPermaLink="true">https://www.schweda.net/blog_ax.php?bid=653&amp;wdl=en</guid>
<author>heinz.schweda@schweda.net (Heinz Schweda)</author>
<wfw:commentRss>https://www.schweda.net/blog_ax.php?bid=653&amp;wdl=en</wfw:commentRss>
</item>
<item>
<title><![CDATA[SysOperation-Framework: Enable batch processing by default]]></title>
<description><![CDATA[
<p>If you want to activate batch processing by default for a function implemented via the SysOperation framework, you can do this by modifying the UI Builder like in the following example.
</p>


<pre class="pre_blog_axcode">
public void build()
{
    super();
    
    this.controller().batchInfo().parmBatchExecute(NoYes::Yes);
}
</pre>


<p>The code activates the checkbox <em>Batch processing&nbsp;</em>in the <em>Batch </em>tab.
</p>


<p><a href="http://www.schweda.net/pictures/blogpics/ax2012_sysoperation_batchbydefault_en.png" rel="lightbox" target="_self"><img alt="Screenshot" height="170" src="http://www.schweda.net/pictures/blogpics/ax2012_sysoperation_batchbydefault_en.png" title="Screenshot" width="601" /></a>
</p>]]></description>
<category>Microsoft Dynamics AX (Axapta)</category>
<pubDate>Fri, 04 Jan 2019 20:06:00 +0100</pubDate>
<link>https://www.schweda.net/blog_ax.php?bid=651&amp;wdl=en</link>
<comments>https://www.schweda.net/blog_ax.php?bid=651&amp;wdl=en</comments>
<guid isPermaLink="true">https://www.schweda.net/blog_ax.php?bid=651&amp;wdl=en</guid>
<author>heinz.schweda@schweda.net (Heinz Schweda)</author>
<wfw:commentRss>https://www.schweda.net/blog_ax.php?bid=651&amp;wdl=en</wfw:commentRss>
</item>
<item>
<title><![CDATA[Reading the contents of an AXMODEL file]]></title>
<description><![CDATA[
<p><img alt="Microsoft Dynamics AX 2012 Management Shell" height="59" src="http://www.schweda.net/pictures/blogpics/ax2012_managementshell.png" style="float:right; padding-bottom:10px; padding-left:10px" width="258" />If 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.
</p>


<p>Such information can be read with the <strong>Microsoft Dynamics AX 2012 Management Shell</strong>:
</p>


<pre class="pre_blog_axcode">
Get-AXModel -File &#39;c:	empdynamicsax2012r3_cl4555332.axmodel&#39; -Details
</pre>


<p>Here&#39;s how it looks:
</p>


<pre class="pre_blog_axcode">
Manifest                   Summary                    Elements
--------                   -------                    --------
Microsoft.Dynamics.AX.F... {Classes: 3}              {ClassesWHSLoadLineI...
</pre>

<br /><a class="div_blog_category_gotodetail" href="https://www.schweda.net/blog_ax.php?bid=647" target="_self" title="Weiterlesen...">Weiterlesen...</a>]]></description>
<category>Microsoft Dynamics AX (Axapta)</category>
<pubDate>Fri, 23 Nov 2018 19:53:00 +0100</pubDate>
<link>https://www.schweda.net/blog_ax.php?bid=647&amp;wdl=en</link>
<comments>https://www.schweda.net/blog_ax.php?bid=647&amp;wdl=en</comments>
<guid isPermaLink="true">https://www.schweda.net/blog_ax.php?bid=647&amp;wdl=en</guid>
<author>heinz.schweda@schweda.net (Heinz Schweda)</author>
<wfw:commentRss>https://www.schweda.net/blog_ax.php?bid=647&amp;wdl=en</wfw:commentRss>
</item>
<item>
<title><![CDATA[Create cost center by code]]></title>
<description><![CDATA[
<p>If you are ever embarrassed to have to create a cost center by code, this job may serve as inspiration:
</p>


<pre class="pre_blog_axcode">
static void createCostCenter(Args _args)
{
    str 30 _costCenter = &quot;0815&quot;; // 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;
        }
    }
}
</pre>]]></description>
<category>Microsoft Dynamics AX (Axapta)</category>
<pubDate>Mon, 05 Nov 2018 22:01:00 +0100</pubDate>
<link>https://www.schweda.net/blog_ax.php?bid=645&amp;wdl=en</link>
<comments>https://www.schweda.net/blog_ax.php?bid=645&amp;wdl=en</comments>
<guid isPermaLink="true">https://www.schweda.net/blog_ax.php?bid=645&amp;wdl=en</guid>
<author>heinz.schweda@schweda.net (Heinz Schweda)</author>
<wfw:commentRss>https://www.schweda.net/blog_ax.php?bid=645&amp;wdl=en</wfw:commentRss>
</item>
</channel>
</rss>	
