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

Monday, February 7, 2011

Update item cost price to on-hand cost in AX 2009

A common request from the client is to update their item costs under costing version (Item master > Price button) to the latest on-hand cost. I think it’s common because on-hand cost could change quite a bit from the original go-live cost price as time goes by, and this is especially true for weighted average items. As many of you know, the cost price from costing version is used in many places for calc invent cost, e.g. counting/PL journal, std cost rollup, etc. Though inven adjustment and close could rectify this problem (to some extent), you’ll have to live with the incorrect financial reports throughout the time and remember to adjust the cost again on next inv close. There is a checkbox on the item master – “Latest cost price” which saves the latest cost price to the costing version. However, I found it doesn’t work properly in a multi site environment. VersionID is always empty.
I couldn’t find an out-of-the-box function in AX to address this issue, so decided to do customization. On the costing version form, I added a button “update cost to on-hand cost”. On the new form, you can select which items you want to update, and then click ok. That’s it. Here are some highlights:
  • To update item cost price (Items > Price button > Costing versions) to its on-hand average cost.
  • Added a field CopiedFromOnHand to the CostingVersion table, so those pending costs added by this script can be easily identified when to be activated
  • Assume each operational site only has one main warehouse
  • Only the item that has physical inventory for the warehouse gets updated.
SharedProject_UpdateCostPriceToOnHand.xpo

Microsoft Dynamics AX Tech Conf 2011 Part II

New Way of Configuring Products – Constraint-based Approach
  • Dev license is no longer needed for configuring products
  • Can be used to configure both item and service
  • All levels of the model can be viewed on the same form
  • It’s based on a Constraint Solver – delivered by the MS Solver Foundation
  • Constraint-based approach is a declarative language of natural rule formalization. Compared to rule-based, more efficient and no more nested if-else statements needed.
  • Configurator components include: Attributes, Constrainnts (table and expression), Sub components, User requirements, BOM lines, Route operations
  • Rule-based configuration is still supported but not recommended.
  • Shipped with a configurator API
  • Limitations: no support on intercompany sales due company-specific BOM’s; re-generate configuration id each time even when the same attributes are selected
Developing Adv Reports: Deep Dive
  • Underlying message: MorphX report is still supported by AX 2012 but not recommended an will be eventually replaced by SSRS
Upgrade Tools for Developers & Admin
  • Tool: Preprocessing Upgrade Checklist
  • Support upgrade from 4.0 and 2009 to AX 2012
  • Upgrade procedure is as follows:
  • Upgrade readiness: checks if there is any upgrade conflict or issue
  • Preprocessing: converts data and puts into shadow tables. There are some out-of-box classes that can handle data conversion to adapt differences between the old versions and AX 2012. e.g. financial dimensions, products, etc. In fact, I think this is a good reference/overview of what’s new in AX 2012.
  • Delta preprocessing: only preprocesses data that has been updated since last preprocessing. Makes upgrade more efficient.
  • Actual upgrade
  • Preprocessing consists 80% of the upgrade and it doesn’t affect the system availability. Only the last step requires downtime.
  • Preprocessing tasks can run in parallel and workload can be controlled based on the traffic in the system
App Integration Framework Enhancements
  • Simplified config: the number of AIF config menu items are reduced to very few; “End points” are replaced by “Ports”
  • Support non-XML input files: non-XML is auto converted to XML format in AX
    Purchasing Process Drill-down
  • Procurement category: managed in a structured hierarchy and can be imported from files. Allows purchasing without an item number!
  • Procurement catalog: internal procurement catalog and external vendor catalog. External vendor catalog allows user purchasing from a vendor’s website.
  • Procurement policies: act as validation rules on purchasing
  • Purchase req’s with the same vendor id can be combined and converted to one PO.
  • 17 out-0f-box procurement workflows, e.g. purch order, purch line, etc.

Microsoft Dynamics AX Tech Conf 2011 Part I

I was thrilled to attend the DAX tech conf 2011 last week. It was a great 4-day event, because not only I had the chance to have a very refresh look of the new AX release – AX 2012, but also I was surprised and encouraged by the number of attendees – over 1200, doubling MS expectations. It’s great to see such tremendous interests in the market. Without any doubt, I think AX 2012 is a big improvement over the previous versions. Here is a summary of the sessions I went.

Financial Data Architecture
  • Shared COA, currencies, calendars and dimensions
  • Unlimited # of dimensions
  • Dimension can be created based on user’s custom list, e.g. site, campaign, etc.
    Global Address Book
  • To reduce data redundancy, addresses are ONLY stored in the address table and not populated in other related tables, e.g. salestable, purchtable.
  • Unlimited # of addresses: 1 type of address can have multiple addresses.
  • Addresses can be selected on the go.
  • Security on GAB controlled by “policies”: creat a team and assign the team to GAB to restrict access on related records.
Patterns in Building Forms for Usability (2 sessions)
  • Form layout has changed. It has nav pane, action pane (replacing buttons on the RHS), filter view, grid view, description pane, and fact box.
  • When design a form, can select from Styple, e.g. list page, detail form, etc.
  • Grid view is grouped by fast tabs instead of tabs
  • Form has Edit and View modes, to prevent user accidentally deleting/editing records
  • Same form can be published for EP use. Simple like that! This is controlled by a new form property “Display Target”, i.e. auto, form, EP
  • Parts (like widget). Can be reused on any form. E.g. fact box, description pane.
  • Fact boxes display a collection of related records to the current record, e.g. customer, sales orders for this customer.
  • AX wizard tool for validating form style. Inconsistencies can be fixed by either auto fix or user manual change.
  • Menu item has a region/country property. In each company, it only shows menu items matching the country code.
Role-based Security (2 sessions)
  • Roles (80): a collection of business duties, more like business title e.g. AP clerk, sales manager, etc.
  • Duties (767): job functions and can be categories by process cycles, e.g. cutting cheques, sales order entry, etc.
  • Priviledges (5777): a group of entry points for specific tasks i.e. menu accesses, e.g. create AP payment journal, create sales order, etc.
  • Permissions (20k+): security on objects, e.g. CREATE ledgerjournaltable, CREATE ledgerjournaltrans, etc.
  • Out-of-box roles can be categorized by functional (AP clerk), org title (CFO), app role (system user)
  • Can dynamically assign roles to users based on user defined query, e.g. based on job title
  • Role hierarchy is supported, e.g. acct mgr could include acct clerk role.
  • Duties can be categorized as Enable, Maintain, Inquire, Record, Verify, etc.
  • Duties should may need to customize to represent business domains, and should stay relatively stable over release.
  • New security access to standard AX objects should rarely go below the Duties level, meaning adding/editing roles and duties should be good enough to meet business security requirements.
  • Dont need to maintain security for different domains. Can select which company user should get the role when do role assignment. Can assign to companies across domains!!
  • Can assign user either roles or duties or priviledges
  • Duty segregation: to avoid security conflict, can set up segregation rules so whenever a conflict occurs AX will alert for proper resolution.
  • XDS (extended Data Security) framework: allows to define “policies” to restrict views on linked tables. e.g. Primary table (custtable) – constrained tables (custtrans, saels table, projtable), and a policy defines a query that the user shouldn’t see any records from certain customers.
  • Out of box AX 2012 has 11 predefined policies
  • Ax users don’t have to in the AD. Easier to manager external users.
  • Security key is no longer needed
Product Master Data
  • Add in a new concept “Product” on the top. It is shared across all companies.
  • “Items” are replaced by “Released Products”. Items can’t be used till products are released
  • Item can be directly created without first going through product master, and a product master will be created correspondingly.
  • “Inventory dimension” is replaced by “proudct dimension”, “storage dimension” and “tracking dimension”.
  • Items can be shared across different companies when they’re released
  • Product dimensions, storage dimensions and prod attributes are shared
  • Product type: Item, Service
  • BOM is not shared
  • Product can have different “product variants” based on combination of dims. Each prod variant can be released as an item.
  • Item model group has added a checkbox for stock or non stock items. Item item with non-stock (e.g. expense items)- inventtrans but no inventsum.
To be continued.