Tuesday, March 1, 2011

Transfer order with misc charges

On a previous project, we discovered a way in AX 2009 to process transfer order between sites WITH MISC CHARGES such as freight. The standard transfer order function in AX doesn't provide the ability to record misc charges on transfer. But for some businesses, intracompany transfer freight could be very expensive and it must be captured for inventory cost. So, we tweaked the intercompany order function in AX a bit to serve for this intracompany transfer purpose, and it worked for us! Here is what we did.

There are frequent transfers of some heavy items between Site A and B, and freight cost must be entered into the inventory. Assume all regular parameters (e.g. site, warehouse, dimensions, etc.) are properly configured.

1. Create two special customers A and B

  • Assign a special customer group where you'll set up postings for intracompany transfers.
  • Check checkboxes for intercompany customer (Setup tab - Autocreate intercompany order, Direct delivery), if you want a sales order auto created when a PO is created or direct delivery to a real customer. 
  • Make sure you enter a default site and warehouse under the Sales Order tab. 
  • Click Setup button - External code and create an external code. Because customers and vendors are in two different tables, you have to link them through an external code. 

Customer External Code

2. Create two special vendors A and B, as the previous step. 

3. Go to Basic > Setup > AIF > End points, create and configure an intracompany transfer end point. Make sure Company under General tab is set to the current company. Put your special customers and vendors as the Constraints. 
 
4. Still on the end point form, Click Action Policies. Out of the box, you should have two policies, PurchaseRequisition and SalesOrder. 
 
Action Policies

5. Click Setup tab for each policy and configure the parameters as you wanted. Note, if you want the price editable from the derived order, you want to make sure the "Allow price edit" checkbox is checked. 

6. On each policy, click Configure button. Since this is for transfers within a company, I recommend to select Our for all mappings except Vendor, Customer and Misc Charges which should be External. Same as vendors and customers, an external code should be entered for misc charges (AR/AP - Setup - Misc charges code).

Configure value mapping

That's it for intracompany transfer order settings. Now, you can create your transfer order with misc charges from either sales or purchase order, and verify if misc charges are allocated to your inventory.

Thursday, February 24, 2011

Only able to select companies in the domain

Here is a security tip I learned from a previous project. After company domains are all properly configured, it's natural you want users only to be able to select companies that they belong to. If you grant access to Admin - Open domain access, it'll open up all companies in AX for the user to select, although he can't do or see anything in the companies that he doesn't belong to. What's even annoying is he can't click company link and go to the other companies and gets stuck in the wrong company unless restarts AX.

A very simple workaround. Create a separate user group for each domain for company selection. In this group, DON'T give access to "Open domain access", but give access to Admin - Tables - Company data. Remove company access from all the other user groups and add this special group to the group collection. Here you go. Only able to see companies in the domain.

Wednesday, February 23, 2011

Out-of-the-box connector between Dynamics CRM and AX

Today, Microsoft announced it's building an out-of-the-box connector between CRM and AX and data migration assistant for moving from Oracle db to SQL. New Microsoft Dynamics ERP Resources Save Customers Time and Money
Microsoft Corp. (Nasdaq “MSFT”) today announced new resources to help improve productivity and save Microsoft Dynamics enterprise resource planning (ERP) customers time and money through new interoperable Microsoft technologies. The new resources include an out-of-the-box connector between Microsoft Dynamics CRM and Microsoft Dynamics AX and a Data Migration Assistant for Microsoft Dynamics AX customers moving from an Oracle database to Microsoft SQL Server.
The connector is available between either Dynamics CRM online or on-premise and Dynamics AX. Having been able to work with both Dynamics CRM and AX, I think this is a great move by Microsoft. From time to time, customers ask me what's the difference between Dynamics CRM and CRM in AX, or why Dynamics CRM can't talk to AX easily - they're both Microsoft product right? My response normally would be "uhh..." I don't want to tell customer that the foundation of current AX isn't truly Microsoft-based which makes integration harder. With no doubt, there are tremendous demands on combining the full ERP spectrum of AX with the great mobility/flexibility of CRM and working seamlessly together. It looks like the time has come now. Let's see when the tool will be ready for the community to play.

Tuesday, February 15, 2011

Over-a-year workflow issue finally gets closed!!

It's a big day in the history of my AX life. After over-a-year battle with Microsoft on a workflow issue, today we've officially got the issue closed!!! I'm not sure if this is the longest-open case in Microsoft AX history so far, but I've almost got thrown up on this marathon.
The client has AX 2009 SP1 on two AOSs. Business connector, IIS and AX settings were all configured. However, the following error got thrown randomly every other days and got completed workflow strandered. "Stopped (error): Failed to find workflow instance. Failed to find workflow instance."


There are several unique issues that make this workflow problem hard to solve:
  • Error throws after workflow is completed.
  • It seems errors randomly occurred. When there are a large number of workflows (> 50) being processed, errors are likely to be thrown.
  • Hard to repro the error or test solutions. We had to accumulate enough workflows in the queue in order to trigger the error. It was a real pain by doing this all manually. Later, we wrote a script to simulate the submission process and it's much better.
  • We have custom workflow templates.
The hotfix number is 2398999 in case you're seeing this error and don't want to spend another year on finding the solution :)

Tuesday, February 8, 2011

Production variance reval by inv close

In AX 2009, as a new feature, at the last step of an inventory close after settlement, it'll revalue production variances for ended work orders. This is the method that does the actual job: Class InventCostHelp > updateLedgerPosting, and I stripped the method comments:

Controls the last stage of the inventory closing.
In this stage the following things will be done:
- Production variances for ended production orders
- Indirect cost for open production orders
- ledger postings
- Creation of the inventCostTransSum records
- Final check against the prodTable


If you want to analyze the variances from the closing voucher, e.g. which prod orders generated the variances, you'll have to dig into the InventCostTrans and InventCostTransVariance tables, or check the IM>Inquiries>Standard cost transactions form.
A comprehensive digest of inv close in AX can be found at Denis Fedotenko's blog on Costing and Inv Closing