Sunday 18 May 2014

AIF exception error “Instances of abstract classes cannot be created”

The AIF exception errors normally are quite self explanatory; especially validation but recently we were faced with the following odd error: -
The request failed with the following error:  Instances of abstract classes cannot be created
What is very odd about this error is that we knew we didn’t have any code that was trying to instantiate an abstract class. After all we had no compile errors.
So what could be causing such a strange error? My immediate thought was that it was so odd that it could be a corruption of some kind. The most likely corruption would be an IL build one and this was indeed the case. We executed a full IL build and once that had been done we were able to successfully import data via AIF again without any error.
So if you are ever faced with an AIF exception error “Instances of abstract classes cannot be created” I would recommend you first check your IL build.

Saturday 17 May 2014

Failed to create a session; confirm that the user has the proper privileges to log on to Microsoft Dynamics Axapta R2- R3

Hi all ,
I faced this error in AX R3 "Failed to create a session; confirm that the user has the proper privileges to log on to Microsoft Dynamics" , so did some research. It seems the UserInfo table is not correctly updated and the partition administrator is not updated correctly when you restore an existing DB or the Demo database.
To fix this, you can do the following.


  • Stop the AOS
  • Restore the database again
  • Start the AOS
  • Start a client and complete the partition initialiasation checklist
  • Close the client and execute the script below on the SQL database
  • Restart the client and reimport your license (if you were restoring the Microsoft demo data, the demo license is back in there)
  • Then compile / generate CIL / DB sync and you should be on track again!
The script for updating the UserInfo inforation is as follows:
DECLARE @NetworkDomain nvarchar(255);
DECLARE @NetworkAlias nvarchar(80);
DECLARE @SID nvarchar(124); DECLARE @InitialPartition BIGINT;
 
SELECT @InitialPartition=Recid FROM PARTITIONS WHERE PARTITIONKEY=N'Initial'
 
SELECT @NetworkAlias=NETWORKALIAS,@NetworkDomain=NETWORKDOMAIN,@SID=SID FROM USERINFO WHERE PARTITION=@InitialPartition AND ID = N'Admin'
 
UPDATE USERINFO SET NETWORKDOMAIN=@NetworkDomain,NETWORKALIAS=@NetworkAlias,SID =@SID WHERE PARTITION != @InitialPartition AND ID = N'Admin'

Saturday 3 May 2014

Microsoft Dynamics AX 2012 R3 Training: Transportation Management

Hi ,

This link is helpful for who is responsible for the setup and administration of transportation management functionality. Get an introduction to the transportation management flow and concepts in Microsoft Dynamics AX 2012 R3. The information is helpful for Transportation Managers, Transportation Coordinators, Shipping Planners, and Shipping Clerks.

http://channel9.msdn.com/Series/Microsoft-Dynamics-AX-2012-R3-Training/01

Microsoft Dynamics AX 2012 R3 Warehouse Management

Hi ,

This link is helpful for who is responsible for setup and administration of warehouse management functionality. This will help to get an introduction to warehouse management flow and concepts in Microsoft Dynamics AX 2012 R3. The information is helpful for Warehouse Workers, Warehouse Managers, and Shipping and Receiving Personnel.

http://channel9.msdn.com/Series/Microsoft-Dynamics-AX-2012-R3-Training/02

Sunday 27 April 2014

Adding new fields to the AX 2012 R3 retail distribution sub-jobs Or create new sub-jobs for new tables to the AX 2012 R3 retail

Hi All ,

This post focus on Jobs creation in retail from the code. This post will give the idea of how to customize the retail cdx classes for job creation as well as add customize fields to sync the data to the channel database.

After debugging the code from initialize button on Retail Parameter form I got to know that class RetailCDXSeedData and its child class RetailCDXSeedData_AX63 has major role in the job creation in AX R3.

As we see in the parent class RetailCDXSeedData->  run() method, we find the following code.

while (subjobEnumerator.moveNext())

    {

        subjobMethod = subjobEnumerator.current();

 

        seedDataClass.resetParameters();

        dc.callObject(subjobMethod, seedDataClass);

 

        if (subStr(subjobMethod, 1, 2) == 'C_')

        {

            seedDataClass.createSubJob();

        }

        else if (subStr(subjobMethod, 1, 2) == 'A_')

        {

            seedDataClass.appendFieldMapping();

        }

    }

 

Here we can see that parent class look in to the child class that is in to class RetailCDXSeedData_AX63 for methods whose name stars with the C_ or with the A_, then it define tables and fields that will be synchronized.

At this time there no "A_" methods available in AX R3, so difference between "C_" is not clear. What we can see from the code is  A_ methods might be use to append the new fields to existing sub-job.

Each of the “C_” methods simply initialize some class instance variables so they’re all really simple. Each method will generate the setup required for one sub-job and attach that sub-job to one or more jobs. The variables that we must set depend on whether it's a sub-job to send data to the POS or a sub-job to pull data back.
For a send style sub-job, you need to initialize the following variables
JobIDContainerA container of strings with each element defining the distribution job Id that the sub-job should be linked to. Typically this would be a single element container but there is no reason why you cannot link a single sub-job to multiple jobs using this approach.
subjobIDA string defining the id of the sub-job to be created/amended.
axTableNameThe name of the table that will be synchronised by this sub-job.
axFieldNamesA container defining the list of fields that the sub-job will synchronise.
For a sub-job designed to pull data back from the store database we need to define the same variables as a send sub-job plus the following additional variables.

isUploadA boolean variable that should be set to true.
ReplicationCounterFieldNameA string that defines the replication counter field name (typically “REPLICATIONCOUNTERFROMORIGIN”) which should also be included in the axFieldNames container.
tempDBTableNameThe name of the TempDB temporary table used during synchronisation.
 
 Here is the example of C_ method for a pull job.
private void C_RetailTransactionAttributeTrans()
{
    jobIDContainer = ['0001'];
    subjobID = 'RetailTransactionAttributeTrans';
 
    axTableName = tableStr(RetailTransactionAttributeTrans);
 
    axFieldNames = [
        fieldStr(RetailTransactionAttributeTrans, Channel),
        fieldStr(RetailTransactionAttributeTrans, Name),
        fieldStr(RetailTransactionAttributeTrans, ReplicationCounterFromOrigin),
        fieldStr(RetailTransactionAttributeTrans, store),
        fieldStr(RetailTransactionAttributeTrans, terminal),
        fieldStr(RetailTransactionAttributeTrans, TextValue),
        fieldStr(RetailTransactionAttributeTrans, transactionId)
    ];
 
    isUpload = true;
    replicationCounterFieldName = 'REPLICATIONCOUNTERFROMORIGIN';
    tempDBTableName = 'RetailTransactionAttributeTransT';
}
 
 
Let’s assume that I want to add a field to the RetailBarcodeMaskTable table and have that synchronise to the store database. For this I would need to modify the C_RetailBarcodeMaskTable() method as follows.
 
private void C_RetailBarcodeMaskTable()
{
    container    myCustomFields;
 
    jobIDContainer = ['1040'];
    subjobID = 'RetailBarcodeMaskTable';
 
    axTableName = tableStr(RetailBarcodeMaskTable);
 
    axFieldNames = [
        fieldStr(RetailBarcodeMaskTable, Description),
        fieldStr(RetailBarcodeMaskTable, Mask),
        fieldStr(RetailBarcodeMaskTable, MaskId),
        fieldStr(RetailBarcodeMaskTable, Prefix),
        fieldStr(RetailBarcodeMaskTable, RecId),
        fieldStr(RetailBarcodeMaskTable, Symbology),
        fieldStr(RetailBarcodeMaskTable, Type)
    ];
 
    myCustomFields = [
        fieldStr(RetailBarcodeMaskTable, MyCustomField1),
        fieldStr(RetailBarcodeMaskTable, MyCustomField2)
    ];
    axFieldNames += myCustomFields;
}
As you can see, rather than directly modify the code that sets the axFieldNames variable I have created my own container variable local to the method and added my fields to that. The local variable is then simply appended to the axFieldNames container so that it contains both the standard and custom fields.  This means that, although we will still have to merge code during an upgrade if the standard field list has been changed, it will always be a simple operation to merge in whatever new changes are in the new Microsoft code.

To Add New table :
It should be reasonably obvious from the text above that adding a new table into the synchronisation setup should be a simple matter of creating a new “C_” method a following either the send or pull method pattern appropriately to determine which variables should be set. The framework will automatically see the new method and will execute it along with all of the existing standard methods, creating your new sub-job and attaching it to whichever job you want to attach it to. If you need to define an entirely new job then you should modify the RetailCDXSeedData_AX63.createJob() method, adding a new line of code to create your job.

6 Things you did not know about Microsoft Dynamics AX 2012-R3

Here are 6 things you might not know about Microsoft Dynamics AX 2012-R3.
1. There are no longer extra GL entries generated from the two voucher item posting strategy
This corrects a design issue when the distribution framework was introduced in AX2012.  Fewer entries are made to the GL and the normal effect of posting a receiving to accrued purchases shows in a more sensible way.
2. There are now additional Inventory Storage Dimensions for Inventory Status and License Plate
Inventory statuses can also be tied to blocking features to only allow inventory that is truly available for immediate sale
3. The reservation Hierarchy determines how dimensions are used in the warehouse
The reservation hierarchy is the key to warehouse management and automation and can be configured differently for items that require more detailed manual reservation.  Understanding the hierarchy is important to the overall system automation and flow.
4. Items must be assigned to a storage dimension that is Warehouse Manageable from the beginning
Items must be associated with the correct storage dimension at creation.  Changing the storage dimension after transactions exist is not supported.  Microsoft will be introducing conversion utilities for existing customer installations post release.  Make sure to work closely with your account manager and solution delivery manager to plan your upgrade.
5.AX 2012 R3 will be available in the Cloud on Microsoft’s Azure server platform
Once released this could be the fastest and most cost effective way to deploy both development and UAT infrastructures for Dynamics AX.  There are still costs directly with Microsoft to run Azure servers but the overall speed of setup and the elimination of any hardware purchase make this a compelling offering.  And with Azure you only pay for server time used!
6. PowerQuery is a free download as an addin to Excel 2013 and 2010 that can integrate directly with your instance of AX2012 company data
PowerQuery allows an AX user to connect directly with Queries and Services exposed to the document framework of the Excel Addin. This allows easier creation of business intelligence reports on AX data directly connecting to the AX company database.  This does not require Office365 and can run standalone.

Reference from http://www.uxceclipse.com/pages/blog-detail.aspx?newslist=Blog%20List&itemId=19

Saturday 26 April 2014

New features in Microsoft Dynamics AX 2012 R3

Microsoft Dynamics AX 2012 R3 is released April 2014. New capabilities added to Dynamics AX 2012 R3 span horizontal and vertical features; however, this time enhancements also include mobile apps.
The new Dynamics AX 2012 R3 horizontal features are expected to cover e-procurement and budget planning to help improve operational efficiencies and support the planning needs of complex organizations.
E-procurement new features include:
  • Improved management of Request for Information (RFIs), Request for Proposal (RFPs) and Request for Quote (RFQ) from solicitation to award for enhanced efficiency
  • Better control on response types to include sealed, open, and reverse auction type bids
  • Ability to define evaluation criteria and scoring of RFxs upfront, allowing for improved decision making
Anticipated Budget planning features include:
  • 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
Microsoft has also made many enhancements to Warehouse Management and Retail Dynamics AX 2012 R3.
Warehouse Management has improvements to capabilities that will help users streamline distribution and warehouse operations. Improvements include:
  • Enhanced inventory control through 360 inventory visibility, real-time cycle counting and replenishment
  • Embedded radio frequency that provides real-time transaction processing through mobile devices including receiving, putting away, picking, staging and loading
  • Rate, route and load planning that includes inbound and outbound planning, order consolidation, routing guides, constraints-based routing, load build capacity calculations, multi-mode planning, and methods to select a rate for specific loads based on the carrier’s rate profile
Retail is a fast-paced and ever evolving industry. Shoppers are mobile, connected and expect an omni-channel shopping experience. Microsoft created the following features with that in mind.
  • A native and immersive Windows 8 Tablet Point of Sales (POS) and Mobile POS for Windows Phone 8, allowing retailers to provide differentiating customer facing in-store experiences
  • Loyalty programs across legal-entities and tiering of customers as well as enhanced gift card support
  • Enrichments to pricing and promotions, assortment and catalog, BI and reporting, and seasonality and markdowns enhancements helping optimize revenue
As mentioned above, Microsoft has also added mobile apps with this release. It’s not a new concept for employees to be on the move all the time. Mobile apps makes it easier for them to do certain tasks on the go and improves their efficiency.
  • Time entry allows employees to capture time worked on projects simplifying this administrative task while providing businesses the opportunity to improve working capital through decreased billing cycle times
  • Approvals enables business requests like budget, time sheets, submitted expense reports to be approved on the go
  • Capturing and reconciling expenses while traveling allows organizations to implement policies more seamlessly and shortening time to get money back to employees
You can learn more about the expected feature enhancements in the Dynamics AX Statement of Direction. As we get closure to the release of R3, more details will be released.