Showing posts with label Dynamics AX 2012 R2. Show all posts
Showing posts with label Dynamics AX 2012 R2. Show all posts

AX 2012 R2: Prevent startup of checklists

maqk® by Maqk | 3:31 PM

AX 2012 R2: Model upgrade check list does not disappear



Subject

This post discusses a scenario when the ModelStore gets updated after applying KB hot fix. However the checklist keeps coming after it is fully completed and there is no way to make it disappear permanently.


Audience

Dynamics AX 2012 (FP, R2 R3) X++ Developers, Technical consultants, Functional consultants, and advanced users.


Background

Hot fix implementations are a regular task for developers and technical personnel alike. After any hot fix, a checklist is presented to the user mainly to recompile the whole application and synchronize. The checklist depends on the type of upgrade and can be of the following type



Problem

Sometimes however, hot fix implementation fails which can have any reason. In our scenario we faced a similar situation where we had to undo the hot fix. We simply restored the model store database. However the model upgrade checklist would keep coming.


Checklist Framework

There is a solution provided by the framework. It is the menu item provided in the Checklist section. The full navigation is: /System administration/Area page/Setup/Checklists/Prevent startup of checklists


What it does ?


Points to Action menu item: SysCheckList_InitNoUpdate
Which then calls the SysCheckList class with the base enum: SysCheckListType and SetDB as selected value. 
The main method for this base enum value provided runs the following
                case SysCheckListType::SetDB :
                    SysCheckList::initNoUpdate(true);
                    return; //mark upgrade and setup as finished



This method fires the SysSetupLog::saveEx() and SysSetupPartitionLog::saveEx() methods which updates the SysSetupLog and SysSetuppartitionLog tables with values representing the completed status for each type of checklist. These methods are called for each checklist type. This is achieved by sending the name of the class specialized for each checklist type to the save methods. Hence for each type, a complete record is maintained in the database. This gives the hint that this table is read at the client startup to evaluate if any checklist remains to be updated. See image below

SysCheckList::initNoUpdate() method body


A failed attempt


I marked all such records as completed. Nothing happened. Checklist kept coming. There is definitely more to the doings of the mentioned method which I would have missed in my update query.

The focus of this post is not to understand the SysCheckList class and its internals, neither was it my focus when trying to get rid of the checklist. So... I googled :D


Solution


SysCheckList_Update::finalizeMinorUpgrade();

The link shared in the following section provided the solution to this problem. This is why for every such problem, we should try to searching for relevant API provided in the framework.

This method actually does similar things discussed above along with deleting unwanted records from SysSetupLog table and updating the ReleaseUpdateConfiguration table. However, it does it fully and bring results.

Links


  • http://dynamicsuser.net/forums/p/76421/421256.aspx 

AX 2012: You are not authorized to access table ‘’ (). Contact your system administrator.

Audience

Dynamics AX 2012 (FP, R2 R3) X++ Developers, Functional and Technical consultants and advanced users


Background

You may experience the subject mentioned error while opening a table / view

Problem

I experienced this error while creating a new view. When I accessed it to see if it is working as expected, I received this error.




I carefully examined and found that actually no fields are added into the view.


Solution(s)

At this point of time, every one knows the solution, add some field dude. Adding fields to the view solves the error. However this error is quite distracting as it can take you to an American Wild Goose chase i.e. towards security and authorization implementations. so keep googling before diving straight into the deep AX sea :P


AX 2012 - Define items of a combo box at design time

maqk® by Maqk | 11:27 AM

Combo box in AX 2012

Background

There are numerous ways to load values into a combo box in AX forms. The most common is to use base enums. One way is to use sysTableLookup to load master table data. Another way is to load another form at lookup event and interchange values using args. However sometimes its convenient to define custom items at design time. And such a thing is not very obvious in AX IDE. I recently discovered while answering an AX community post that HcmWorkerLookup form has an other way to do the same.

We all as ASP.Net developers know that we use to define the members of a ComboBox control. There is a similar way to do the same in AX as well. This is useful if your combo box has small no of items in it which are static, unchangeable values and are not suppose to update

Problem

When you have few static options to provide to user and for some reason, you want to show the user control as a combo box, you better define those few options at design time.

Solution(s)

I love AX due to the rapid development engine and reusable frameworks. AX provides the solution to the above problem definition by providing enough properties to define all the members / items under a combo box control. The ComboBoxControl has three properties which will be used.

You will have to focus on 3 properties on the combo box control. 

  1. Items - It is the number of items (count) to appear on the combo at run time.
  2. Item  -  It is the currently selected item at design time, the following property works on the currently selected item
  3. Text -  It is the name or caption to appear for the currently selected item (number entered in Item property)

So how will you design it  ? E.g. you want three items to appear in your combo with values defined at design time and without involving any BaseEnum or table values or EDT relation. For three items, you will set the Items property of combo to 3. Then, to define the text values for each item, you will have to repeatedly update the Item property ( current item ) to 1,2, 3 and provide text value for each in the Text property.

Try it, its not cool may be, but knowing this IS COOL for sure ;)

Links

  • https://community.dynamics.com/ax/f/33/t/179483  

Valid length of a form field label

maqk® by Maqk | 3:34 AM

AX sometimes surprise you. Such surprise often make you chase a wild goes all day to reveal it was just a dead rat :@

This just happened with me but all to reveal something I don;t think would be available on internet

Try these:

  1. Find or create a label with 250+ length. 
  2. Assign this label to a form field (not static field or any such control)
  3. Open that form
  4. Your client just crashed
Why am I telling this to you at all is the fact that my client wanted me to put huge texts against form fields. Weird, but sometimes we face requirements about which client donot accept any consultancy or education, and we just HAVE to implement it.

Now can you imagine how wild those 400+ length labels made me work and search and find the clue why my client is crashing. I went through everything including full compile, sync, cache cleanup, .auc files, label file regeneration. I had to take every step due to the reason that evenvwr log was not much of a help in my scenario. I am attaching the log for your reference here;


Application: Ax32.exe

Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationException
Stack:
   at Microsoft.Dynamics.Kernel.Client.ActionPaneInterop.ClickEventHelper.Clicked(System.Object, System.EventArgs)
   at Microsoft.Dynamics.Framework.UI.WinForms.Controls.ActionItem.OnButtonClick()
   at Microsoft.Dynamics.Framework.UI.WinForms.Controls.ActionButton.OnMouseUp(System.Windows.Forms.MouseEventArgs)
   at System.Windows.Forms.Control.WmMouseUp(System.Windows.Forms.Message ByRef, System.Windows.Forms.MouseButtons, Int32)
   at System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.Control+ControlNativeWindow.OnMessage(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.Control+ControlNativeWindow.WndProc(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)
   at ._wWinMainCRTStartup()


Conclusion
Length for a field label (non static text control) is 250

Enterprise Portal Development Videos

maqk® by Maqk | 3:05 PM

I have just started EP development - and I never knew it was all the same - just that proxies adds minor of complexity

And guess what - all my web dev xp is gonna get polished back

EP comes with some very powerful and ready to use web parts. This post is however a 'LINKS' and not 'TUTORIAL' post, the latter will come by next year since every1 is going for holidays. 

So without any delay, here they are, all videos, enjoy:

  • How do I videos - Enterprise Portal Development Series: 
    http://msdn.microsoft.com/en-us/dynamics/ax/cc507280.aspx
  • Videos at CustomerSource
    • Creating simple Enterprise Portal Lookups using EDT, DataSetField and custom lookups using DataSet or User Controls in Microsoft Dynamics AX 2012: http://mediadl.microsoft.com/mediadl/www/d/dynamics/customersource/CCAX2012HT0030_Enterprise%20Portal%20Lookup.wmv
    • Understanding record context when interacting with data in the Enterprise Portal for Microsoft Dynamics AX 2012: http://mediadl.microsoft.com/mediadl/www/d/dynamics/customersource/CCAX2012HT0029_Enterprise%20Portal%20Record%20Context.wmv
    • List page development in the Microsoft Dynamics AX 2012 Enterprise Portal: http://mediadl.microsoft.com/mediadl/www/d/dynamics/customersource/CCAX2012HT0031_Enterprise%20Portal%20List%20Page%20Development.wmv
    • Detail page development in the Microsoft Dynamics AX 2012 Enterprise Portal: http://mediadl.microsoft.com/mediadl/www/d/dynamics/customersource/AX2012CoreConceptsVideo_CCAX2012HT0032_EPDetailsPagesDev.wmv
    • Developing detail page interactions with Microsoft Dynamics AX 2012 Enterprise Portal, Part1: http://mediadl.microsoft.com/mediadl/www/d/dynamics/customersource/nCCAX2012DI0015_1_Enterprise%20Portal%20Details%20Page%20Interaction%20Patterns%20-%20Part%201.wmv
    • Developing detail page interactions with Microsoft Dynamics AX 2012 Enterprise Portal, Part2: http://mediadl.microsoft.com/mediadl/www/d/dynamics/customersource/CCAX2012DI0015_2_Enterprise%20Portal%20Details%20Page%20Interaction%20Patterns%20-%20Part%202.wmv
    • Debugging customizations and new development with the Enterprise Portal for Microsoft Dynamics AX 2012: http://mediadl.microsoft.com/mediadl/www/d/dynamics/customersource/CCAX2012HT0028_Enterprise%20Portal%20Debugging.wmv



Recently I had to change, increase rather the length of a string variable in a service constituting Table. Simple thing huh. I created a new string EDT with more length and attached to the string field. My Import Utility (AIF) for Items (Products) failed with the data length error.

Invalid document schema. The following error was returned:  The 'http://schemas.microsoft.com/dynamics/2008/01/documents/TableName:FieldName' element is invalid - The value 'sample value provided by API consumer' is invalid according to its datatype 'http://schemas.microsoft.com/dynamics/2008/01/sharedtypes:AxdExtType_SomeDefaultEDTName' - The actual length is greater than the MaxLength value. The actual length is greater than the MaxLength value.

Actually the document schema was mentioning the same old data type. I was quite sure there must be an automated way to refresh the xml schema of the related document.There is one, under Tools > AIF > Update Document Service (from IDE). This opens the 'Update document service' form



In my case however, it created some new classes, new Ax<Table> classes. Then I refreshed AIF Services from AOT > Forms > AifService (form).


One more thing to mention is that the new classes had bugs in them, specifically in the methods that were dealing with the cacheObject classes. Their bodies were commented for developer to write desired implementation. But this was totally out of scope for me, I removed those methods. All fine, incremental CIL generated. AIF refreshed, hit my utility > Import, same old jeopardizing error :(

The schema was same old, same old shared type referenced :S. I realized that Ax<Table> class is wrapping the table, lets see there :) Yes there it is, the parm method referring to the field i changed.


public fieldEDT parmField(fieldEDT _fieldEDT = '')
{
    if (!prmisDefault(_searchName))
    {
        this.setField(fieldNum(TableName, FieldName), _fieldEDT);
    }

    return tableBuffer.FieldName;
}

Solution

Actually this class wraps the table, and this class and its methods and meta data are used to create and refresh Document Schema. If you have to add a new field in your web service, you may add / modify the parm methods in the particular Ax<Table> class.

The BUG

Refreshing through Update Document Schema added new Ax<Table> classes. However, in the respective Axd<Table> class class method (), they were not mentioned in any case. This resulted in following error;
This document does not support the AxEcoResProductIdentifier class.
I am quite sure it was the update document schema > 'Regenerate data object classes' process bug, it should have made respective case scenarios and initialized relevant Ax<Table> classes. See below illustration

There are tons of blog posts available on the internet guiding to use business connector for read/write operations. Most of them are dealing with how to write opening a table buffer, initializing it, setting field values (set_Field()) and then hitting the write operation.

This is good and simple, and so is sending parameters to table / class, but I could not find the later under any relevant title, hence getting the exactly required thing difficult.

I found my need fulfilled somewhere in Mr. Corey Lasley's blog post: Using the .NET Business Connector to Export...

So the topic actually is about reusing existing business logic. And in doing so, you will need to call several existing, well defined, well tested Class / Table methods. And in doing so.... :D you may need to call paramater less and parameter requiring static methods.

There are two methods inside the 'Axapta' class, 'CallStaticClassMethod' and 'CallStaticRecordMethod'. Both of them calls static methods from Class objects and Table objects respectively. The below code (.Net --> C#) excerpt provides a tutorial for calling an existing existing table method and passing parameters to it.

Axapta ax;
            AxaptaRecord objAxRec;
            Object[] parm = new Object[2]; 
            Object result;
            parm[0] = "Param1Value";
            parm[1] = "Param1Value";

            try
            { 
                ax = new Axapta();
                ax.Logon(null, null, null, null);
                result = ax.CallStaticRecordMethod("InventSum", "find", parm);                
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
As you can see, an array of objects (size of method's parameter count) is assigned values and passed it as the last parameter.

For classes, use 'CallStaticClassMethod'
Often we need to make action panes and menu items on customized locations which form templates won't generate. Hence we need the icon ids for icons like new, edit, cancel, excel etc. Sure you will open a system form (Say salestablelistpage) and check their the icons and their ids. 

A good alternative is to have a reference table / list of all such icons you may require again to use later in such a scenario. So here it goes :)

Common image IDs for Action pane (Embedded / AOT Resources)

NEW BUTTON GROUP

New:   11045


MAINTAIN BUTTON GROUP
Edit:   10040
Edit in grid:  10011
Cancel (document): 10406
Delete:   10121


COPY GROUP
Copy:   12475
Copy Lines:  12218


OTHERS
Summary (calc):  10832
Print Mgmt:  10698
Line Quantity:  12415
Trade Agreement: 12430
Cases:   11229
Document confirmation: 10511
Line Amounts:  12458 (11038)

LIST GROUP
Send to Excel:  10156
Refresh:  11437


ATTACHMENTS GROUP
Attachments:  10442
Generate from Template: ImageResourceOfficeTemplate_ico [AOTResource]


Dynamics AX 2012: Add new design to a control document (report)

maqk® by Maqk | 5:36 PM

There can be reasons to add a new design to an SSRS report
  •  Have multiple designs side by side and print each for specific scenario
  • Have the new customized design deployed while preserving the original one
  • Have designs for different localization (As seen in AX default reports)
Its your choice. I used to keep the original report layout and fields so that I can get to the previous state whenever I want without worrying of any XPO imports. For a simple report, this may be as straightforward as mentioning the report deign name in the ssrsReportName method as follows;

However for control documents (reports generated at each specific state of a business document), this needs one more level of definition.

Set Custom design from code

Normally the report name is provided to the class as follows
controller.initArgs(_args, ssrsReportStr(SalesPackingSlip, report));

The ssrsReportStr method takes 2 parameters
  1. The report name - string
  2. The deisgn name - string
For control documents, this alone is not enough. Control document designs / formats are to be configured from the Print management feature provided in setup.

Path: -> Setup .> Forms -> Forms Setup
e.g. Accounts Payable > Setup > Forms > Forms Setup


The form provides each control document identified by the system and report and its format associated as default.

But your custom design won't appear in the configuration form unless a system class is modified for the same. There is a class with the name, "PrintMgmtDocType" with a method, 'getDefaultReportFormat()'. The default report design of a control document is resolved when the framework calls this method. You will notice that all the different localization based report formats are mentioned under the localization checks. In order for your custom design to appear in the configuration, you will have to return your custom design in some condition in this method.

For example, suppose you have added a new custom report design for sales invoice report. The code modification may look as follows;
case PrintMgmtDocumentType::SalesOrderInvoice:
if (SysCountryRegionCode::isLegalEntityInCountryRegion([#isoEE]))
{
    return ssrsReportStr(SalesInvoice, ReportEE);
}
return ssrsReportStr(SalesInvoice, CustomDesign);

You may add conditions like configuration key checks, company name, localization, menu item checks etc to decide which design to load.

Also note that these designs are originally built in the Visual Studio IDE (reporting tools extensions). When the AX model is build in visual studio and compiled in AOT, the new dsesign name is also available in X++ and would get compiled. Otherwise, the AOT may give error and may not recognize the new design. After the above code, the Print Management setup form would look like this;


Select the custom design and generate the particular control documents to see your new design in action :)
السلام عليكم و رحمة الله و بركاته
Hello and many congrats to all the readers for the new year. With the new year comes new challenges and their solutions. We continue to experience new hurdles and when we successfully handles them, create new blog posts to share our resolution with the readers. I wish this series of NEW thing continues to help us enhance our experiences to perform better in our professional careers :)

This new year eve I spent on my live client only to get surprise to see an error while deploying the changes that I made in the SalesInvoiceReport. After right clicking the report (emphasized due to recent changes)



Actually I added a new design to keep the original layout and created a new one. But all this complexity did not collaborated in the production of this error. I checked the report server is rightly configured in AX (validated the configuration to get all success), checked the report server configuration, it has to be fine since the all the reports were working fine flawlessly. 

Definitely there was something wrong due to some recent things I added. The SSRS report would compile OK, The DP and controller classes would compile fine. The model object... ahan. I compiled the model object to get a few errors. I cant remember the exact error now, and unfortunately I could not take any snapshot then, but one of the errors I remembered said 
'GenerateRdlTask failed'
Googling all this gave nothing exact for my problem. until I somehow looked in the windows event log which removed all the dark clouds in front of me and gave the real picture right in front of my eyes


Exception trace

Generation of the WCF configuration has failed, and the previously saved local configuration will be used.
Exception details:
System.InvalidOperationException: Unable to connect to a Microsoft Dynamics AX WCF service. Ensure that the Microsoft Dynamics AX AOS has fully started and that the requested WCF service is available. See the exception message below for details:
>Metadata contains a reference that cannot be resolved: 'http://myserver:8101/DynamicsAx/Services/MyMisConfiguredWebService'.
   at Microsoft.Dynamics.AX.Framework.Services.Client.Configuration.ClientConfigurationInternal.GetEndpointCollectionFromWsdlUri(String wsdlUri)
   at Microsoft.Dynamics.AX.Framework.Services.Client.Configuration.ClientConfigurationInternal.RetrieveIntegrationPortEndpoints(String aosServer, Int32 wsdlPort, List`1 portInfoList, Dictionary`2 endpointPortMap)
   at Microsoft.Dynamics.AX.Framework.Services.Client.Configuration.ClientConfigurationInternal.RetrieveEndpointsFromMetadata(String aosServer, Int32 wsdlPort, List`1 portInfoList, Dictionary`2 endpointPortMap)
   at Microsoft.Dynamics.AX.Framework.Services.Client.Configuration.ClientConfigurationInternal.ParseWsdlFromAos(String aosServer, Int32 wsdlPort, List`1 portInfoList)
   at Microsoft.Dynamics.AX.Framework.Services.Client.Configuration.ClientConfigurationInternal.GetClientConfiguration()

WCF Configuration

Initially I could not realize this error is related to my issue, deploying a changed report from AOT. But soon I realized this error will generate whenever I will attempt to deploy the report. This means that WCF configuration is always generated whenevr a report is attempted for deployment. I have ye to explore this things. I know that SSRS is based on WCF (and so is the new batch framework, SysOperationsFramework that is).

Architecture with dependency ?

But still should there be a new WCF configuration generation at deployment of each report ? Which will fail eventually if any web service endpoint is maliciously configured ? I think we definitely can have improvements here :)

The exception trace clearly mentions one of my test web service which was long stopped / moved whatever and was not taken care of since a lot of time. I saw a red "minus" icon (common for disabled or not working item representation) along with it. I deactivated it and then deployed the report. The report deployed with no more exceptions

Conclusion

Whenever a report is deployed, the WCF configuration is generated which can fail if any web service is misconfigured. The above stack trace confirms this.

AX 2012 R2 - Installing new databases from setup

maqk® by Maqk | 7:43 PM

Their can be scenarios when you want multiple databases on the same service. For example having a separated testing environment, development environment, staging and production.

I mentioned one such scenario in one of my previous posts in which I installed the new databases only to see the face of another error :) The 110 error code. 


The thing is, when you install new databases from the AX 2012 R2 setup, it does install new databases quite successfully. However, it misses two critical stored procedures on the database, the CREATESERVERSESSIONS and CREATEUSERSESSIONS

You can get these stored procedures from any dynamics ax 2012 r2 database and an apply on to your new database to fix the error.

DAX 2012 R2 CU6 SYP Labels issue fix

maqk® by Maqk | 12:26 PM

I recently upgraded my local environment from Dynamic Ax 2012 R2 (Flat: build no# 6.2.158.0) to CU6 (6.2.1000.1437 - 2012 R2 Cumulative Update 6 (CU6)). The process was seamless however one issue arrived. The lable files. A lot of labels (in various mnodules including GL etc) started appearing as just flat label IDs 


Info log after CU6 upgrade

I found the solution in one of Ing. Karel Fischl's msdn blog: Missing SYP labels after upgrading to AX2012 R2 CU6 with just a minor adjustment, the two types of files to be removed from the location: are 

  • ALC files (Label description)
  • ALD files (Label data)
And thats it, worked 100% on my production :)

Dynamics AX 2012 - Workflow not working properly

maqk® by Maqk | 3:56 PM

While doing some customizations, I needed to use the purchase requisition workflow. However after submitting the purchase requisition, the workflow wont proceed and no work items would create.

Batch job and Batch groups

Workflow is dependent on batch groups. Perhaps all tasks appearing under the 'Periodic' heading are. The development environment I was working on had an empty named batch group. But the problem is not with a no name or empty name thing. It is the details the batch group carries, if it carries any :)

A Batch Group represents a Batch Server (AOS Server)

Its all about distributing workload and responsibility, for load balancing. A batch group posses no significance if it has no AOS servers associated to it. See the picture below;
System Administration > Setup > Batch Group

Hence if the workflow activities and tasks generated are being dependant on an empty batch, such activities wont occur / complete.

The Story

In my case, the empty batch group was really empty (rotfl) and I dont know for what reason it was like that. What really happened was that first I went to sys Adm > Inquiries > Batch Jobs. There I tried to tweak with multiple waiting, error status jobs. I came to find that only the With Hold status jobs are modifiable. Once that was known, I started putting the jobs on this status and doing things with them. There I saw no name appearing in the batch. This also raised the question if this empty batch associated has issues with it. Later I went to see no server is associated with the group. I associated the default and only AOS server  on the VM to the group and there you go :) Happy workflowing

Some useful links for your reference are attached below;

Links

For quite some time, I was looking for this answer ? What benefit in the world does multiple models give ? I just could not figure it out from the basic definitions available at most of the places

A model is a set of elements in a given layer. Each layer consists of one or more models. Each layer contains one system-generated model that is specific to that layer. Every element in a layer belongs to only one model. In other words, no element can belong to two models in the same layer, and every element must belong to a model.
There we some questions that kept arising all the time

  • Is the end user suppose to switch in between the available models ?
  • If two or more models can be operational, what in the world is is the significance of the current model
And so many more, it was all too frustrated. To my surprise, most of the available developers and consultants were even not able to clear my concept of the purpose of multiple models side by side. To my luck, I came across a convergence video about models and metadata architecture. There, the presenter cleared it all away. 

Actually models are providing a way to export customizations (from say development or staging environment ), import them in another environment (production) without disturbing as many models already installed from n numbers of ISVs and vendors. 

Let me explain the concept with an example. Lets suppose you being an end user have a customization deployed in your production environment from vendor A, on the form, say.... Vendor List Page. And those customizations has additional menu buttons in the Action Pane. Now you bought another solution which has other customizations on the same form. Now you already have the Vendor form customized in, say VAR layer and the new vendor is also developing customizations in VAR layer ? So how would the two different versions co exist now ? How would the same element on the same layer have 2 different versions with end user expecting to get the new customizations without disturbing the already deployed customizations. This is where models come to play :) 

Since each layer can have multiple models, or slices if you ask the framework developers, each vendor can now produce their own model, install at the same layer, and both co exists meaning 2 different model customizations will be available at run time for the end user. This has questioned both of my questions actually since the current model is for developers and not for end users and that all models on respective layers render on runtime shadowing the layers  underneath.
A scenario at our end required to have the same client able to connect to multiple AOS server instances, say DEVELOPMENT, TEST and PRODUCTION environments. One way is to have multiple client configurations, and toggle them to the desired server configuration when needed. See the image below;

Dynamics AX Client configuration utility


However for more ease of use and friendly behaviour, we can have a single client with multiple shortcuts each toggling the client configurations on run time based on command line parameters :) But to successfully do this, we obviously need to know the command parameters we can attach to the AX client executable [AX32.exe]. So here we go;

Client configuration commands [AX 2012]


http://technet.microsoft.com/EN-US/library/aa569653.aspx


Now with the information from the above link, we come to know that regConfig is the parameter we can provide with the AX32.exe to mention the client configuration name the client will run accordingly. A sample command is compiled as follows;

ax32.exe -regConfig=ConfigName

You can test the above command with correct configuration names from the Run command box [Windows+R] and can play with it too :)
Try to provide an incorrect configuration name and see what happens. Try giving a wrong command and notice the behaviour.

Coming back to the topic, what we did was to have two different shortcuts, each with its own command line parameters
  • Client 1 - "AX32.exe - regConfig=YourFirstAOSClientConfig"  
  • Client 2 - "AX32.exe - regConfig=YourSecondAOSClientConfig"  

See the image below;


Now both the shortcuts are pointing to the same single AX32.exe but with different values in the parameter '-regConfig' thus directing the client to connect to a different client configuration from the default one. Now these configurations can be a copy of each other or associated to the same server with different databases or entirely different AOS servers, this is entirely up to you how you need it :)


top