• Skip to main content
  • Skip to primary sidebar
  • Home
  • About
  • Recommended Readings
    • 2022 Book Reading
    • 2023 Recommended Readings
    • Book Reading 2024
    • Book Reading 2025
  • Supply Chain Management Guide
  • PKM
  • Microsoft Excel
  • Microsoft Copilot in Office 365
  • Public Wiki Page

Ali Raza Zaidi

A practitioner’s musings on Dynamics 365 Finance and Operations

Dynamics Ax 2012 R3

Clear the Cache on all clients Dynamics Ax 2012

August 10, 2014 by alirazazaidi

Last week I post a solution to problem of old code on Dynamics Ax 2012 Client, That work for single client and it is not possible to clear cache on manually on every client. Later I found better solution to reset the client cache at AOS. Reference is

Reset program cache file for all clients


According to that reference we have to reset the GUID, so all Clients have to reset its cache, this method required AOS restart.

static void ResetAUC(Args _args)
{
#AiF
SysSQMSettings _Settings;
;
ttsbegin;
update_recordset _Settings setting GlobalGUID = str2Guid(#EmptyGuidString);
ttscommit;
info("Now we have to Restart the AOS Service to use a new GlobalGUID.");
}

Its works for me.

Little bit taste of List In Dynamics Ax 2012

August 5, 2014 by alirazazaidi

In Dynamics Ax List is used as collection, You can add , remove or update elements in it. Type of list is define at the time of its declaration and cannot be change after initialization.

We can iterate in List with the help of ListIterator object, which have several methods to process on list.

   
 List           intList       = new List(Types::Integer);
    List           strList = new List(Types::String);
    ListIterator   literator  

    // add the element at the end of the list
    intList.addEnd(123); 

    // add the element at the start of the list
    intList.addStart(321); 

    intList.addEnd(300); 

    strList.addEnd ("Raza");

    strList.addStart ("Ali"); 

    strList.addStart ("Zaidi"); 

    // If you want to insert the data at some specific index, then you need to make use of the listIterator class 

    // Iterator performs a midpoint 

    // insert at current position. 

    literator = new ListIterator(strList);
    while (literator.more())
    {
        // can provide some condition, i.e. if check etc
        if (literator.value() == "Ali")
        {
            listIterator.insert ("Between Raza and Zaidi");
        }
    }

Dynamics Ax 2012 Error Code 90, Unable to connect to database

August 5, 2014 by alirazazaidi

My friend Bashir Ahmad Malik got following error during start up dynamics Ax service.

 

“The Microsoft Dynamics AX Object Server 6.2$01-MicrosoftDynamicsAX service terminated with service-specific error Code 90.
Suspect state of SQL Server database is a state when you are unable to connect to the database. “

 

During trouble shooting we find following root causes.

 

  • database is corrupted
  • database files are being “opened” or held by some process (operating system, other program(s)…)
  • not enough disk space for SQL Server
  • insufficient memory (RAM) for SQL Server
  • unexpected SQL Server shutdown caused by power failure

 

we solve this problem by following Sql Script.

  1. Connect database server with Microsoft SQL Server Management Studio.
  2. Execute the following SQL script in given order:

NOTE: replace [DatabaseName] with your database name

-- This query will rollback any transaction which is running on that database

-- and bring SQL Server database in a "single user" mode

ALTERDATABASEMicrosoftDynamicsAX SETSINGLE_USER WITHROLLBACKIMMEDIATE

 

-- Marking database READ_ONLY, disable logging,

-- and limiting access only to members of the sysadmin fixed server role

ALTERDATABASEMicrosoftDynamicsAX SETEMERGENCY

 

-- Checks the logical and physical integrity of all the objects in the specified database

DBCC checkdb(MicrosoftDynamicsAX)

 

-- In case of simple failure then we can use allow data loss option to recover Database

 

--  DBCC CheckDB (MicrosoftDynamicsAX, REPAIR_ALLOW_DATA_LOSS)

 

-- Set database accessibility to it's original state, allowing all logins

ALTERDATABASE MicrosoftDynamicsAX SETMULTI_USER

EXEC sp_resetstatus MicrosoftDynamicsAX


reference : http://social.technet.microsoft.com/wiki/contents/articles/25820.repair-a-suspect-database-in-sql-server.aspx

Dynamics Ax 2012 Client cache problem

August 3, 2014 by alirazazaidi

A few days ago, I was working on Dynamics Ax 2012 customization. When I shifted code to QA server, Compile, Generate CIL, but no changes display on client. I was shocked, latest code working fine on my machine but why it is not working on QA server. AOT shows the latest code. During troubleshooting I found that it is due to Client Cache.  For this I have to delete cache files form cache folder. AX cache files have “auc” extension.

 

I found auc files from following folder

C:\Users\aliraza.zaidi\AppData\Local\

 

I perform following steps.

  1. Close Client on machine.
  2. Stop AOS service.
  3. Delete all auc files from local cache folder.
  4. Restart AOS.
  5. Open client.

 

I found latest code working fine on QA server.

Install and configure Analysis Services for Dynamics AX 2012 R3

July 20, 2014 by alirazazaidi

If analysis services are not deployed on machine, then deployed it and select analysis services from sql server installation wizard.

Insdy

 

After installation, Please verify that sql server analysis services are running in services.

 

 

Analysis services services

 

Run the Dynamics Ax 2012 R3 setup to install the Analysis services component.

 

Setup Dynamics Ax

 

 

Validate the prerequisite and if they failed install the prerequisites

 

successful Vaildation

 

During installation wizard select the service name.

 

7-20-2014 11-10-07 PM

 

 

 

Select the AOS server name and database. if default then set to Dynamics Ax

 

 

 

 

 

7-20-2014 11-10-29 PM

 

 

 

 

Setup complete

 

 

Now open the dynamics ax 2012 Client and form file menu ==> Tools ==> Business Intelligence ==> sql

 

Wizard

 

 

select next

wizard1

 

Select the Deploy option

Deploy

 

deployOptions

Deployment process

status

Deployment process took 1 hour on my machine.

Deployment

Deployment are successfully install on my machine.

image21

Little helpful X++ editor extensions for Dynamics Ax 2012 R3.

July 14, 2014 by alirazazaidi

During search I found link codeplex for X++ extension, freely available Extensions at CodePlex by  José Antonio Estevan Estevan. This extension helped me to identify

  • Starting and ending of brackets.

–highlightbacket

  • Collapse and un-collapse sections wrapped with {- and }-brackets.

Collpase

  • Highlight the all occurrence of keyword in method similar to  NotePad++

HighlightKeyWords Installation of this extension is also very easy.

  • Download Zip file from following link from codeplex. http://ax2012editorext.codeplex.com/
  • Extract zip file.
  • Close all Dynamics Ax client instances on development machine.
  • Copy all files in extracted folder.
  • Paste all in following location.

X:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin\EditorComponents Instal     Inspiration: http://yetanotherdynamicsaxblog.blogspot.com/2013/03/free-editor-extensions-for-ax2012.html

How to integrate Dynamics AX 2012 R3 AIF Document Service with BizTalk server

July 1, 2014 by alirazazaidi

Purpose: Purpose of this post is help to Consume AIF Document service in BizTalk and call its method.

Assumption: that target audience has deep knowledge of BizTalk, mapping, schema and orchestration.

 

First of all you have to create service group that is gateway to your document service. For this post I have to consume VendVendGroupService. I create a new service group  in AOT and drop VendVendGroupService to that node as follow

 

ServiceGroup

 

Right click and deploy the service group.

 

Deploy Service Group

 

 

Wait for generate Increment CIL and Infobox shows deployment of All possible Service group

VendorServiceGroupInfolog

 

Now to System Administration module of dynamics Ax. Click on System Administrationè Setup è Services and Integration frameworkè inbound port.

 

InBound Port

 

 

Now create a visual studio project for BizTalk. There are three sub solution, One for Schema, Map and third for orchestration.

 

In Schema solution. Add the generate Items and then select consume wcf Service

ConsumingAiFservice

 

Now add copy wsdl to generate Schemas.

Select metadata Exchange (MEX) endpoint

 

MetaData

 

 

Click next and generate schema

 

Schema Generation

 

Wsdl

 

 

Schema is generated.

 

VendorGroupSchema

 

Go to Schema project and delete the Vendor Group Service Orchestration.

 

 

Required Services

 

Important Schema which will used in mapping.

 

 

EntityKeyList Schema has following fields which are used to set values in Request response methods.

 

Entity List Schema

 

This key value pair used for search , Field represent table field Name and value is search field.

 

VendorGroupSchemaDetail

 

VendorGroup schema is replicate of VendorGroup table, here we use SenderId is used legal entity where operation will perform.

 

If we see the Service Schema, here all request and response methods are generated.

 

ServiceSchema

 

 

One Schema I create to take input to Interface, and decide which operation is performed I called it for InputSchema.

 

CustomSchema

 

This Schema will use for input to Interface. We will discuss it later when we start mapping one by one.

 

 

Bindings:

As compare to other wcf service, when we consume wcf service, empty binding files are generated, so we have create binding operations manually.

These operations are based on AIF service Object not AIF service Group, where I wasted hours on it.

Please consider the following screenshot for Service operations used in binding files.

ServiceOperations

 

The operations in BtsAction will be generated as follow.

Namespace +/+ExternalName+”/”+method name. All Action are similar. For example

 

http://WIN-IKPOSIU2SGD:8101/DynamicsAx/Services/VendorGroupService/read.

 

Settings for BizTalk Send Receive port is as follow.

 

NetTCPBindings

 

 

Pipeline settings:

Send Pipeline should be XML Transmit.

Receive Pipeline should be XML Receive.

Click on Configure Button and set as following.

 

WCF Settings.

 

Remember the Operation Name in SOAP action header mast be identical to Operation Name in logical port in Orchestration.

1234

 

All action mapping is as follow.

 

<BtsActionMapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<Operation Name="ReadOP" Action="http://schemas.microsoft.com/dynamics/2008/01/services/VendGroupService/read" />

<Operation Name="CreateOP" Action="http://schemas.microsoft.com/dynamics/2008/01/services/VendGroupService/create" />

<Operation Name="UpdateOP" Action="http://schemas.microsoft.com/dynamics/2008/01/services/VendGroupService/update" />

<Operation Name="DeleteOP" Action="http://schemas.microsoft.com/dynamics/2008/01/services/VendGroupService/delete" />

<Operation Name="FindOP" Action="http://schemas.microsoft.com/dynamics/2008/01/services/VendGroupService/find" />

</BtsActionMapping>

Mappings:

I attached  screenshots for mapping used for calling AIF methods.

 

Read Method:

 

Read method is two-step process, first step map the input to Entity list, and then Entity list  to VendGroupReadRequest

 

 

Input_To_EntityList

 

Entitylist_to_VendGroupRequestRead

 

 

Create Method:

In the case of Create Mapping is as follow.

 

InputSchema_to_VendorGroup

 

VendorGroup_to_CreatVendorGroupRequest

 

Delete Method:

 

EntityList_To_DeleteRequest

 

 

 

Update Method:

Update is little tricky, There is field in Update Request Schema, _DocumentHASH, This Field is hidden and every row has its unique value, without that row is did not updated. According to Microsoft Documentation, First you get /find required record using read or find method and then use response data to Update it. For saving time and for the sake of this tutorial, I just pic the_docuemntHash key form previously read response method and hardcode it in map. This is not generic way, but this solve the temporary and my wants to run the Update AIF document method.

 

FindMessage

 

 

Find method:

Find method is works wonder, if you want to search more than one or all records you can call Find method, where is field with Operation, where you can mentions, value Equal, not equal, greater then equal etc. I want to get all vendor group from Dynamics In response, so I sent its value “not equal”. Response message return all values.

 

FindMessage

 

The code of this tutorial is attached, you can download it from here.


Exploring Drill through Reports in Dynamics Ax 2012 R3.

June 19, 2014 by alirazazaidi

Creating basic drill through reports in Dynamics Ax 2012 R3 is really simple. Consider following scenario where we have to show the list of customer and their sales Orders in particular legal Entity.  In this report when User click on customer account, a new report open which contains list of all possible sales Order.

For this Purpose I created two Static/AOT queries. First for Customer, and second for Sales Order.

 

Customer Query is as follow.

  • Create a new AOT query with Name DyWorldCustomerList.
  • In DataSource add CustTable table.
  • In fields dynamic to true.

CustListTable

 

Similarly Create another Query “DyWorldSalesTable” for SalesTable. With Name DyWorldSalesTable

 

SalesTable

Now Open a Visual studio and create a new Dynamics Ax Report Project

 

Report Project

Add a new report with name

  • DynamicCustomerList

 

  • Add New dataset with Name
  • DynamicCustomerList set its properties as follow

CustomerDataSet

  • Select Following fields
    •   AccountNum
    •    CustGroup
    •    Party

 

  • Drag this DSCustomerList data set on Report Designer to create an AutoDesign.
  • Change the AutoDesign1 properties as follow

o   Name to DesignCustomerList

o   LayoutStyle to ReportLayoutStyleTemplate

 ReportDesinger2

 

Now create another report inside same Dynamics Ax Model Project, this report will call from customer Report

SalesOrderReport

Create and DataSet with DSSaleOrder with query  “DyWorldSalesTable”

SalesOrderDataSet

Drag this dataset on Report Designer and update newly Designer as follow.

SalesOrderDesignerProperties

 

 

Now open the parameter Section of report and add new parameter as “CustId” of string type

CustIdParameter

Now expand report designer and expand Table and add filter with following Properties

NewParameter

Set following Properties of filter

o   From  Expression select “=Fields!CustAccount.Value”

o   Name= Customer

o   Operator =Equals

o   Value “=Parameters!CustId.Value”

Properties

 

Save the report.

 

Now Open the first report “DynamicCustomerList”. And expend the reports design, “DSCustomerListTable” and then Data and select AccountNum.

Right click on AccountNum and select “Report Drill Through Action”

AddDrillThrough

 

Now Double click and Select the report designer which will open against the click on field

ActionProperties

Select SalesOrderReport and its Desinger form dialog

ReportSelectionSalesOrderList

It will create, number of parameters, all belongs to  DynamicSalesOrderList Report as follow

DrillThroughParameters

 

Delete all parameters except AX_CompanyName and CustId. If any other parameter remains, you definitely got following error when you call Sales Order report form drill through option.

“The Microsoft Dynamic AX parameter ID should be a RECID. The exception is System.FormatException: Input string was not in a correct format.”

AfterDeleteParameters

 

Please Select following Values for these Properties AX_CompanyName

Select its value “=Parameters!AX_CompanyName.Value

CompanyNameValue

Please select the following value for CustId as “=Field!AccountNum.Value”

SaleIdValue

Now saves the reports and right click on Report Project to Add to AOT and then deploy on Report Server

 

AOT and Deploy

Now Go to AOT, and refresh the Select the Visual Studio Model Project and SSRS reports into Dynamics Ax project so it will easy to edit or locate easily

Menu2

Now create a Menu Item of Display type and set its following Properties

Menu

Now run the report as follow

 

CusttomerList

As click on first Customer “CNMF-000001” To its salesOrderList , The second report successfully open as follow

SaleOrderList

What’s New In dynamics Ax 2012 R3.

April 4, 2014 by alirazazaidi

I just saw the R3 demo VM. There is Lot of new features.  The major feature Include

  • Forecasting.
  • Budgeting
  • Transportation management
  • A wireless client for warehouse.
  • Retail Module has number of changes.

Let’s see small detail which I just collected.

 

  • Demand Planning – New Sales Forecasting Tool
    In Dynamics AX 2012 R3 a new Sales forecasting Tool giving which provide the more accurate for forecast.
  • Budget Planning – New tool for Budget Preparation 
    A budget planning include in Dynamics Ax R3 which will more standard to support the budgeting process.
  • Now Budget allocation based on allocation basis rules
  • Improved process flexibility and control by default and locked dimension values on certain type of budget plans
  • Evaluation of different scenarios for what-if analysis

 

  • Improved Warehouse Management functionality
    The warehouse management functionality enhanced to support for scanners, wave picking, license plates and process are more improve the warehouse.
  • Improved Inventory Control
  • Embedded Radio Frequency
  • Improved Inbound & Outbound Warehouse Operations

 

  • Transportation Management – New module for Shipment Planning and Control
    In transportation management, a new module that supports planning and packing containers, vehicles routes freight rates booking and billing, this will very important to enhancement for supply chain.
  • Rate, Route and Load Planning
  • Freight Reconciliation

 

Retail

  • A new and Windows 8 Tablet Point of Sales (POS) and Mobile POS.
  • A loyalty programs across legal entities and tiering of customer as well as enhanced gift card support.
  •  There are enrichments in pricing and promotions, assortment and catalog, BI and reporting and mark downs enhancements helping optimize revenue.

 

 

For developer or technical point of

  • a new compiler in Dynamics AX builds in the context of multiple developments integration.
  • A strong TFS Version Control support, which has previous version has problems.

 

References:

Here are some reference and  articles I found

A great article about compiler enhancement in Dynamics Ax 2012 R3 http://axwonders.blogspot.com/2014/03/hi-there-i-hope-everybody-is-doing.html

 

 

A detail article about Project management functionality enhancement in Dynamics Ax 2012 R3

http://sandeepchaudhury.wordpress.com/2014/01/26/enhancements-to-project-planning-functionality-in-ax-2012-r2-cu7/

 

There is registration going on for Webinar for Dynamics Ax 2012 R3 visit following link

https://presentations.inxpo.com/Shows/microsoft/4-10-14/Registration/Registration.html?AffiliateKey=21572&AffiliateData=

 

 

References : http://www.mwdata.dk/news/new-exciting-features-for-dynamics-ax-2012-coming-up/

http://blogs.msdn.com/b/dax/archive/2013/11/05/microsoft-dynamics-ax-2012-r3-a-preview.aspx

http://blog.encorebusiness.com/new-features-microsoft-dynamics-ax-2012-r3/

http://blog.encorebusiness.com/new-features-microsoft-dynamics-ax-2012-r3/

« Previous Page

Primary Sidebar

About

I am Dynamics AX/365 Finance and Operations consultant with years of implementation experience. I has helped several businesses implement and succeed with Dynamics AX/365 Finance and Operations. The goal of this website is to share insights, tips, and tricks to help end users and IT professionals.

Legal

Content published on this website are opinions, insights, tips, and tricks we have gained from years of Dynamics consulting and may not represent the opinions or views of any current or past employer. Any changes to an ERP system should be thoroughly tested before implementation.

Categories

  • Accounts Payable (2)
  • Advance Warehouse (2)
  • AI (1)
  • Asset Management (3)
  • Azure Functions (1)
  • Books (6)
  • Certification Guide (3)
  • ChatGPT (2)
  • Claude (1)
  • Customization Tips for D365 for Finance and Operations (62)
  • D365OF (60)
  • Data Management (1)
  • database restore (1)
  • Dynamics 365 (59)
  • Dynamics 365 for finance and operations (139)
  • Dynamics 365 for Operations (174)
  • Dynamics AX (AX 7) (134)
  • Dynamics AX 2012 (274)
  • Dynamics Ax 2012 Forms (13)
  • Dynamics Ax 2012 functional side (16)
  • Dynamics Ax 2012 Reporting SSRS Reports. (31)
  • Dynamics Ax 2012 Technical Side (52)
  • Dynamics Ax 7 (65)
  • Exam MB-330: Microsoft Dynamics 365 Supply Chain Management (7)
  • Excel Addin (1)
  • Favorites (12)
  • Financial Modules (6)
  • Functional (8)
  • General Journal (1)
  • Implementations (1)
  • Ledger (1)
  • Lifecycle Services (1)
  • Logseq (4)
  • Management Reporter (1)
  • Microsoft Excel (4)
  • MS Dynamics Ax 7 (64)
  • MVP summit (1)
  • MVP summit 2016 (1)
  • New Dynamics Ax (19)
  • Non Defined (9)
  • Note taking Apps (2)
  • Obsidian (4)
  • Personal Knowledge Management (3)
  • PKM (16)
  • Power Platform (6)
  • Procurement (5)
  • procurement and sourcing (6)
  • Product Information Management (4)
  • Product Management (6)
  • Production Control D365 for Finance and Operations (10)
  • Sale Order Process (10)
  • Sale Order Processing (10)
  • Sales and Distribution (5)
  • Soft Skill (1)
  • Supply Chain Management D365 F&O (5)
  • Tips and tricks (278)
  • Uncategorized (165)
  • Upgrade (1)
  • Web Cast (7)
  • White papers (4)
  • X++ (10)

Wiki

  • SCM

Copyright © 2026 · Magazine Pro On Genesis Framework · WordPress · Log in