This blog will cover experiences, triumphs, failures, and the like from the perspective of a Dynamics AX Project Manager.
Thursday, April 12, 2007
Two 'Colorful' Blog Entries of Notability
Kamal's entry on Graph creation in AX:
http://casperkamal.spaces.live.com/blog/cns!9138ED475277CD63!262.entry
Arijit's entry on Color-coding Grid Lines in AX:
http://daxguy.blogspot.com/2007/04/coloring-grids-in-dax.html#links
I will be implementing both of these HowTo's in our implementation once I get my head above water to begin doing some aesthetically pleasing mods to AX.
Thank you Kamal and Arijit in sharing these helpful tips. These explanations are things that I would never have thought to ask the possibility about, mostly due to my tunnel vision toward May 1 :-).
DB
Sunday, April 01, 2007
MVP Award
Thank you,
David Bowles
Thursday, March 29, 2007
XML File Size limitation using FindList AIF Actions
Thursday, March 22, 2007
Passed!
DB
Testing Today...
David
Tuesday, March 06, 2007
Setting AIF To Output All Documents on Outbound Transactions
This field can be found by first opening the 'Endpoints' form in Basic->Setup->Application Integration Framework, then highlighting the Endpoint in question, clicking 'Action Policies', highlighting the outbound action in question, clicking the 'Configure' button, and clicking the 'Setup' tab.
By default, this field is set to 'Yes', which means that AIF will only output the first 1000 records of any AIF outbound transaction where there are more than 1000 records.
Microsoft product screen shot(s) reprinted with permission from Microsoft Corporation.
Wednesday, February 07, 2007
Installing Dynamics AX 4.0 RTM Side-By-Side with 4.0 SP1
1.) Backup the DB of the environment you are trying to duplicate and upgrade to SP1.
2.) Backup the entire Application folder of the environmnet you are trying to duplicate and upgrade to SP1. If you don't know what or where your Application folder is, you probably should proceed any further.
3.) If you have a 4.0 RTM client on the server where your AOS and File Server is located, you must install it.
4.) Make a copy of your Common Folder in the Microsoft Dynamics\4.0\Server\Common location and call it 'Common RTM'. This will allow you to still configure the 4.0 RTM server environments. Otherwise, you will have problems with the new configuration applet saving the RTM configs correctly since SP1 introduces new Clustering settings.
5.) Install Dynamics AX 4.0 SP1, using the steps in the Microsoft Dynamics AX 4.0 SP1 Upgrade Documentation, specifically page 8 and page 9. (Note only installing the Object Server and File Server and possibly the Dynamics AX 4.0 SP1 client if you want to be able to open ONLY the Dynamics AX 4.0 SP1 environment). Note that on Page 9, point #3, you should not include the axsys.aod file in the files you move to Application\Appl\Standard\Old - this will stop you from being able to create an Upgrade Project.
6.) Before Starting the AOS Service, open the Dynamics AX Server Configuration Utility and import/create a new server configuration that puts the new 4.0 SP1 upgraded environment on a different port than your Dynamics AX 4.0 RTM environment.
7.) Start the AOS Service as indicated on the Microsoft Dynamics 4.0 SP1 upgrade document on page 9 point #5. You can continue on with Microsoft's approved steps from this point.
The biggest two points that I can stress about attempting this is:
A.) BACKUP, BACKUP, BACKUP
B.) Don't forget to make a copy of the Common Folder. as stated in #4 above. If you forget this step and try to open a Dynamics AX 4.0 RTM Server configuration file with the Dynamics AX 4.0 SP1 Server configuration applet and save it, you will hose up your server service the next time you stop and start that server service.
Remember, Microsoft does not endorse my steps. These steps worked great for me but may not work so great for you. Please backup and plan accordingly for issues. Please do not take your issues with these steps to Microsoft.
Quick Tip Regarding DB Synchronization Errors
I'm sure most Dynamics AX admins/developers are aware of this but I decided to post it anyway. I didn't know how to fix this error when I encountered it during an attempted upgrade to 4.0 SP1 and also one of the Dynamics AX Technical contractors I worked with on setting up Dynamics AX back in August 2006 also didn't know how to fix the problem and he had worked with Dynamics AX since 2.5 was released.
If you encounter Synchronization errors, view the Application Event Log to determine what caused the error. In my case, there were two tables that contained duplicate data in key fields within multiple records. Because this data was part of the DMO company and there were no other records that were part of any company in use, I simply deleted the tables and re-synchronized. If your records are part of live data, I would advise attempting to correct the anomolies within the database and re-synchronizing.
Hope this helps!
Monday, January 29, 2007
X12 EDI 857/856 Documents
Thanks in Advance!
David
Monday, January 22, 2007
Miscellaneous Topics
Microsoft released an AIF Whitepaper in December that covers just about everything I have posted on my blog regarding AIF configuration. I'm posting the link here because I haven't seen any postings about it on other Dynamics blogs: https://mbs.microsoft.com/customersource/support/documentation/whitepapers/DAX_AIF_Config.htm
We have almost finished all of our AIF development. Now we are concentrating on developing the Invoice output process but finding a slight difficulty due to our interaction with X12 EDI. The X12 version 4010 857 Advance Shipment Notice / Invoice requires that the ASN information appear in a hierarchical format that is similar to:
Shipment
Order
Pallet
Item
The complications with translating to this data structure is that the AIF produces a relational data structure, of which is based upon a Sales Table header, Sales Table detail, and Shipment detail record. For logistical efficiency purposes, the 857 is setup to be hierarchical because you could have a single line item split among one or more Pallets because of a physical limitation on the nunber of items that will fit on one pallet. In order to accommodate for the hierarchical structure, you have to modify AX's functionality, specifically the Shipments table. Within this table you have to add Trailer, Bill Of Lading, Pallet, Item, and Quantity data.
Due to the lack of direct support for X12 4010 EDI Transaction Sets from BizTalk, we decided to utilize MessageWay Solutions MessageWay Managed File Transfer application. It's been a great fit for us since it already has all X12, EDIFACT, and SWIFT EDI formats already integrated into the product. With minimal BASIC programming experience, you can extend the mapping capability past it's basic drag and drop functionality. This also worked much better for us because we wouldn't need a .NET programming on-site to develop C# or VB.NET mapping/translation applets for BizTalk. Although I was not able to get on the testing list, BizTalk 2006 R2 is in Beta now and it reported has all the EDI transaction sets integrated in it.
Finally, I registered for Convergence on Friday. I'm looking forward to attending as this will be my first time. On top of attending MS Convergence, I will also be attending the AXUG Pre-Conference taking place on Sunday afternoon. I encourage everyone to either join AXUG personally or encourage their company to become active in AXUG and attend their regional events.
Thursday, December 14, 2006
VendAccountItemLookup Form
The form is 'vendaccountitemlookup'. This form is used in different areas of AX for use as the vendor field lookup form. So far, I have found it in 'Planned Orders' form within Master Planning and within Inventory Management under the 'References'. I will also place an example screenshot at the bottom of this post.
The problem our engineer had was that the lookup form has three tabs: 'All Vendors', 'According to Trade Agreements', and 'According to External Item Descriptions'. The 'All Vendors' tab only has the Vendor's Name field in it. If you click over to the 'According to Trade Agreements' or 'According to External Item Descriptions', you only see the vendor's account number. Now if you hold your cursor over the field long enough, you get the automated help text, but it disappears after a few seconds. I'm not sure why this wasn't existing functionality, but I am working on modifying this form to include the Vendor name joined to the proper vendor account number for the respective account number in each tab.
The AX Development Team was able to set this field's lookup simply by including the form name in the 'FormHelp' property of the Extended Data Type that represents the Vendor Account field, which in this case the EDT is 'ItemPrimaryVendId'.
I apparently missed this somewhere in the documentation I have read for AX as this being a possibility for assigning a lookup form to a field. To date, I have either coded my lookups dynamically using the systemlookup form within a lookup() method or I have performed it through an autolookup. As you can see this functionality will allow you to create powerful lookups that can even be multi-tabbed.
(VendAccountItemLookup Form)
Microsoft product screen shot(s) reprinted with permission from Microsoft Corporation.
Sunday, December 10, 2006
Update
I have no substantial information to give out on AX this time, unfortunately. I have learned a lot of lessons as a result of having diverted my attention elsewhere for the majority of this past month.
AX 4.0 SP1 has been a distant blip on the radar screen and I was disappointed that it was delayed so long for release. Because of the amount of work that has yet to be completed, I have had to recommend to our project team and management to delay SP1's implementation until after go-live due to our time constraints.
The remainder of this month will be spent getting the AIF side of AX fully running and integrated with our WMS system.
Thursday, November 02, 2006
Custom Validation Modifications to AIF
In general terms, you can make customizations to any of AIF's transactions simply by modifying the appropriate parm[field_name] method within the appropriate Ax[Table] class for the field that you want to add addition customizations on. In my example, I modified the parmItemId method within the AxSalesLine class. Here is the new parmItemId() method with my modification:
public str parmItemId(str _itemId = '')
{
DictField dictField;
ItemId tempItemId;
InventTable tempInventTable;
;
//My custom code to validate ItemId's existence in the Item Master and replace w/ 'InvalidItem' if not
tempItemId = _itemId;
SELECT FIRSTONLY ItemId FROM tempInventTable WHERE tempInventTable.ItemId == tempItemId;
if (tempInventTable.ItemId != _itemId)
{
_itemId = "**INVALIDITEM**";
salesLine.ItemId = _itemId;
salesLine.Name = tempItemId;
}
if (!prmisdefault(_itemId))
{
dictField = new DictField(tablenum(SalesLine),fieldnum(SalesLine,ItemId));
this.validateInboundItemIdString(_itemId,dictField);
if (this.valueMappingInbound())
{
item = _itemId;
}
this.setField(fieldnum(SalesLine, ItemId), _itemId);
}
if (this.valueMappingOutbound())
{
return conpeek(this.axSalesItemId(salesLine.CustAccount,salesLine.ItemId,salesLine.inventDim()),1);
}
else
{
return salesLine.ItemId;
}
}
Although this is my first shot at AIF modification, I would recommend placing your modification above the existing code. The out of the box code does other validations and checks like seeing whether or not AIF should place default data into a field.
Hope this helps!
Friday, October 27, 2006
Stepping through AIF Processing Code
David
Followup to AIF Configuration Entry
First of all the documentation up on MSDN is getting a lot better. The documentation team has added many different articles on explanations of AIF, detailed explanations of the different transactions, and how the AxTable classes work compared to the Axd classes. Check out Dynamics MSDN at http://msdn.microsoft.com/mbs/
Generally, to add a field to any AIF transaction you must first determine the underlying tables to that transaction and add the appropriate fields. In the case of Purchase Orders, the main underlying table to it is the PurchTable/PurchLines or for Sales Orders is SalesTable/SalesLines. This is where you need to add the fields that you would like to appear in the AIF Transaction. Also, if you want these fields to be editable by your users, of course you need to add these to the front end GUIs to these tables. After you have made these additions, run the Axd Class Wizard to make these additional fields appear in the respective action's schema.
Axd Class Wizard Walkthrough
1.) Choose what Query is being used for the Axd Document Creation and click 'Next'.
(If the AIF transaction is one that came with the base AX installation, the query will be named Axd..., i.e. AxdPurchaseRequisition. You should also strive to name all of your custom AIF action queries with the 'Axd' prefix for standardization.)
2.) Leave the Class Name as-is and enter a label for the for the Axd class. Choose what actions can be performed for this AIF document transaction and click 'Next'. For a list of the actions' meanings, see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/AxDeveloperDocs/html/89e37bf6-3dda-4485-b123-d091f46cc2ed.asp. You will notice that the 'Supported Actions' names on the Wizard correspond to the Axd Document Method column.
3.) On this final screen, if this is an existing Axd Document, you should see the 'Generate AxBC Classes' checkbox is grayed out. Check the 'Regenerate existing AxBC Classes' checkbox and click 'Generate'. If the Axd Document is new, check 'Generate AxBC Classes' and click 'Generate'.
4.) Open the Actions form in Basic -> Setup -> AIF -> Action. If the Axd Document you were working on already existed, you can simply highlight the action and click the 'Re-register' button. If the Axd Document was new, click the 'Scan and Register' button to reread all Axd Document classes, which will find your newly created class.
5.) Either way, after the scan and/or register process finishes, you should be able to highlight the appropriate action, click 'View Schema' and see the new field that has been added to the XML schema associated with the action.
Finally, just a quick overview of what the AxTable classes are compared to the Axd classes:
Axd classes extend the AxdBase class which contains the logic for developing the XML Schema and implementing the six Actions referenced above Create, CreateList, Send, SendList, findList, and findEntityKeyList. There is also logic for validating the XML documents for compliance to the XML Schema associated with the Action.
AxTable classes extend the AxInternalBase class and contain the logic for validating and writing data retrieved from the XML documents to their respective tables in AX. This class contains data validation logic. This logic is contain in each parmFieldName method within the respective AxTable class.
Currently, I am working to write my own custom AIF validation logic, particularly in the createListSalesOrder action and particularly with the AxSalesLine.parmItemId() method. Out of the box, AX kicks out any inbound XML SalesOrder that has a SalesLine that contains an ItemId that is not present within the InventTable. I am working to write additional validations to check for the existence of ItemId in the InventTable and if it does not exist, assigning a 'catch-all' ItemId to ItemId such as 'InvalidItem', and writing the original invalid item to the Name field. Ultimately the order will be halted and an alert will be sent to an Order Analyst who will try to determine what is invalid with the Item Id, but the order will still post in the SalesTable/SalesLine tables and won't be kicked out as with the current functionality. My current modifications have yielded failure on the processing part of the AIF but I'm confident I will have success within the next week. Once I determine how to add my validations without breaking the AIFInboundProcessing process, I will post my findings.
I see AIF as have the potential of being extremely powerful and extendable to incorporate custom business logic, but the documentation so far is nonexistent of how to do so in a standardized way in which you won't systematically blow up the existing processes (like I have in my tinkering).
I hope this helps. If you have any questions, I'll try to answer them as best as I can in subsequent entries.
Thursday, October 26, 2006
SP1 Enhancements Released to PartnerSource
Wednesday, October 25, 2006
Unexpected MODULUS functionality in AX 3.0/4.0
I was working towards building functionality to test for the existence of line numbers in the Sales Line table where the line number had a .5 in it. For instance, if the line number was 2.5, I was attempting to perform 2.5 MOD 1 in order to get a result of .5. The only problem was that the system would not give me .5 but instead 0. It turns out that when the original AX developers wrote Axapta, they set the MOD function to only work against integers and not reals, hence the reason why I always got the whole number portion of the line number rather than the decimal part.
My workaround was writing a static method that converts the Line Number into a string, determines where the decimal place is in the string, performs a substring to pull out everything to the right of the decimal and convert it back to a real number and return it. This is essentially doing the same thing as MOD 1 would do to a whole number that has a fractional part.
Hope this bit of info helps!
Saturday, October 21, 2006
Creating Header/Detail-based Linkage On One Form
1.) SETUP THE DATABASES: If you have not already, create your header records table and your detail records table.
a. Creation of your tables should include adding the appropriate Extended Data Types to your table for the fields you would like it to have.
b. Your Detail table should include the field that is in your Header table that you wish to use as the key between the two tables.
c. Add Indexes to both tables while including the key to your header table in the index along with including the same field that is in your Detail table as part of the index.
d. Add a relation to the Detail table to join the fields that appear in both the Header and Detail tables together.
e. If you wish to prevent database anomalies, add a DeleteAction to the Header table that performs a 'Cascade' DeleteAction on the Detail table.
2.) LINK DATABASES TO FORM: Drag the Header and Detail table into the Data Sources node of the Form you wish to use to display the two.
a. Set the Detail table's properties JoinSource property to the name of the Header table and verify the LinkType is set to Delayed.
b. If you do not want AX to automatically add a new record if no records exist, set InsertIfEmpty to 'No' in the Data Source properties of the Detail and/or Header data sources.
3.) DESIGN FORM FROM DATABASES: Add the appropriate container hierarchy to your form design and add the appropriate fields to each.
a. In my form, I created three groups within the form: Header, ControlSplit, and Detail.
b. The Header Group contains a Tab, within the Tab a TabPage, and within the TabPage a Grid control. The Grid control's datasource property is set to the Header table.
c. The Detail Group contains a grid control with the datasource property set to the Detail table.
d. Within the Header and Detail Group's grid, I dragged the appropriate fields/field groups into their respective grids.
Using these steps you should be able to correctly link Header Table data within a form to Detail Table data where only Detail Table data is displayed based upon the current Header Table data record.
I hope this helps those of you who maybe new to AX like myself and are struggling with a similar problem.
Wednesday, October 11, 2006
AIF Documentation Increasing...
AIF documentation is starting to be published up on MBS MSDN. I found some docs that really describe what AIF is all about in the Developer Documentation. These docs are only available up on MSDN and no equivalent .chm docs have been released to update the local help within AX.
You can find them under msdn.microsoft.com under:
-Servers and Enterprise Development
-Microsoft Business Solutions
-Microsoft Dynamics AX
-Developing for Microsoft Dynamics AX
-Microsoft Dynamics AX SDK
-Microsoft Dynamics AX and Other Applications
-Using Microsoft Dynamics AX and Other Applications
-Creating New Documents
This area has helped me understand really what the difference between the Axd classes and the Ax[Table] classes. To sum it up, Axd classes define the XML Schema for the document and Ax[Table] classes validates the data being exported or imported via XML.
My company's order receiving process is very non-standard due to restrictions mandated to us by our parent company. As a result some of the AIF/SalesOrder predefined pieces do not work for us out of the box. For example, we have to accept invalid Item Ids and return them via EDI to the customers who sent them. Out of the box AIF does not accept an order than has one or more invalid Item Ids. With this new documentation, I see now that I do not have to reengineer the AIF framework, but rather only add a few lines of code to handle invalid Item IDs within the AxSalesLine class.
As more and more documentation is released on AIF, the majority of which doesn't look likely to come until after the first of the year, more businesses will be able to customize the AIF document handling process to their specific needs.
I'd like to also say how great Microsoft Support has been during our learning AIF. They have had two LiveMeeting sessions with me so far and have answered all of the indepth technical questions regarding AIF that I have been able to think of. The guys attending the sessions have been AX AIF developers and project management so Microsoft is serious about issue resolution and taking the IT/Development AX Users straight to the people who know the product in and out.
Thursday, September 07, 2006
readPickingList AIF Action XML Export Problem Resolved!
Check the option, recreate a sales order, post the picking list and then you will be able to export it through the 'Inquries' button.
Note: This will not allow any Picking Lists posted previous to the option change to be exported.
