Dynamics AX
  RSS Feed  LinkedIn  Twitter
Want to turn you're data into a true asset? Ready to break free from the report factory?
Ready to gain true insights that are action focused for truly data informed decisions?
Want to do all of this across mutliple companies, instances of Dynamics and your other investments?
Hillstar Business Intelligence is the answer then! (www.HillstarBI.com)

Hillstar Business Intelligence for Microsoft Dynamics AX and NAV on Mobile, Desktop, Tablet


Let us prove to you how we can take the complexity out of the schema and truly enable users to answer the needed questions to run your business! Visit Hillstar Business Solutions at: www.HillstarBI.com

Monday, March 27, 2006

Extending Document Handling

Well I had a great development peice I had to work on. I was given the task to extend the standard document handling of Ax 3.0 for a client. Basically they wanted to use the folder / Archive piece so that documents where not stored in the database, but rather on a file server.

By default this can already happen. The hang up was that the archiving happened in one folder. So there was no real structure. Another bad point to this was that the naming of files used a number sequence. So what they wanted was to give a meaniful folder structure that the system automatically created based on the first two dimensions. Also they wanted to file name to be meaniful, where as it took on the primary field of the table and record it was associated with, plus a _MMDDYY_1+.xxx. So if it was associated with a Sales Order, then it would like similar to: SO00123_032706_1.pdf, and the next would be SO00123_032706_2.pdf.

As for the structure that wanted to supply the "default" folder location, like: c:\temp\ and then have the system auto crrate based on use something like this: c:\temp\01110\3475\. Again if the folder did not exists, then the first time a document was assoicated with a record, then the document handling code would have to grab the dimensions of that record, and then create the folder structue and then the file.

Here the first issue came into play, because what if there was not a dimension associated with that given table, record. If this was the case, then a prompt needed to ask the user what the two dimension values where. Well, in order to accomplish all of this I used reflection through the AppEntity class. This was a wonderful way to gather all this information based on the Common table that was passed in. Through the AppEntity I was able to check to see if a Dimension existed, if not prompt. If so take the value and use to create / use the folder structure. Then I was able to use the AppEntity class again to take and get the TitleField1 of the given Common table and pull the first part of the file name based on that. Now from here on forward this new document handling extension will work for any given table and record that a document is associated to a record.

Well for now that is it, and I can't give out the code to this solution but I can give you an line of code that shows you how I got the title field 1 of the passed in Common table:

entity.getFieldValue(fieldid2name(entity.dictTable().id(),entity.dictTable().titleField1()));

So if this was being associated with a Sales order, and the sales order was SO001234 then the value that is given from this line of code would be 'SO001234'. Same code would return, if it was a purchase order 'PO######' (Replcae # with actual numbers).

Well I hope this helps someone out. Reflection is a great way to code, because you don't always know what you are coding for, however you do know the desired end result.

To give you a little more insight, without revealing to much more code I only changed the DocuActionArchive class, and the DocuRef and DocuValue tables. These were small changes too as all my code went into a new Action class that I created. Well that's all for now, check back soon for more code examples, reviews, news, etc.

Find a job at: www.DynamicsAXJobs.com

Thursday, March 23, 2006

SQL Server Reporting Services

If you plan on using the next version of Dynamics AX that will soon come out, then you need to learn how to use SQL Server Reporting Services. This is the new reporting engine for Dynamics Platform. Should be, because in my on use of both the current 3.0 reporting tool and SQL Server Reporting Services, I really enjoy working with RS over the default reporting in AX 3.0.

Now with that said, how does this apply to 3.0 and current day use. Well because of how great a technical platform AX is, you can modify all reports within Axapta and processes so that all reporting is used with SQL Server 2000 and Reporting Services v2.

There is a great report pack on the Microsoft site that Tectura did. Is gives a based understanding of how to connect to AX from RS, and make it usefull. Something that is not explored throughly is how to connect that from within AX. The thing you have to keep in mind is that for AX 3.0 you want to use a Web Browser Control on a AX form, and then direct that form / control to the correct report. With that, then you can replace Purchase Orders, etc. With a version of it from SQL Server Reporting services. RS is a geat alternative for reporting in 3.0 and it IS the reporting in DAX 4.0 so you might as well create a test enviornment and learn how to set it up, Admin it, and most of all Create reports and use them from Within AX 3.0.

In the not to distant future I have plans on walking you through creating a report in AX 3.0, RS 2000 v2 from within Axapta. Check back soon for that, and other great post!

Find a job at: www.DynamicsAXJobs.com

Monday, March 20, 2006

Managing Lifecycles

If you have ever used the To Increase platform, and lifecycles then maybe you have already had the same question I am about to ask. How do you manage lifecycles once they are in production?

The issue here, is that by default the lifecycles are set at the parameter level for a give process, say purchase requisitions for example. So you create your one lifecycle, associated it at the parameter level, and it applies to all purchase req.'s that are created.

This is great and all in the lab, but come to the real world when you have 32 lifecycles that you want to apply depending on the user, and oh yes these lifecycles need to be able to be updated and changed as needed while in production. By default you can Not do this. The solution I have found that seems to work really well is take the lifecycle association away from the parameter level and marry one lifecycle to one purchase req. By doing this, you enable yourself to copy the one you want to change, change it, and then apply it so that all New req.'s will use the new lifecycle, while current adtive req.'s still have their lifecycle to use until they have been completed.

By taking the lifecycle and marrying it to the purchasre req. at the single req. or 1-to-1 level then you can affectivly manage, update your lifecycles while in production.

Now if the single lifecycle model for all req.'s will work for you, then by all means keep the default. If not, well you will have to implement something similar to what I have described above.

Check back later for more!

Find a job at: www.DynamicsAXJobs.com

Friday, March 10, 2006

Replacing the default lookup form

Have you ever wanted to replace the default lookup form, for say items on a Purchase Order? Well when developing customization and getting AX to fit the business need of a client, sometimes it's very helpful to do just that.

Here I want to walk you through the basic steps of creating a new form, and using it as the lookup form for Items on a Purchase Order.

In our pretend requirement here, the company wants to make only those items that are associated to the given selected Vendor available for selection. Also, they want to be able to search the items list based on the Vendor Item number and description.

The solution to do this is (1) create a form that has the CustVendExternalItem as it's data source. (2) Setup the newly created form, change its methods, and make the CustVendExternalItem.ItemId field as the element.selectMode() value. (3) Take and override at the Form control, ItemId field, lookup() method. (4) Take and pass in the Vendor Account as part of the Parms so that the form can be filtered to show on those items related to the given Vendor Account.

I am going to assume that everyone reading this knows how to create a new form, and set the CustVendExternalItem table as a data source for the form. The next thing you want to do is open the methods of the form and add VendAccount variable for use in the filter.
Next override the init() method and add similar code like this:
VendAccount = element.args().parm()
Make sure to add the above code Befor the super(); call. Now an important step here is to call the element.selectMode(CustVendExternalItem_ItemId). This set the ItemId field as the given selection on form close. Important note here is that if you have not auto declare the field then it will not compile.
Now override the run() method of the class, and after the super(); call perform a CustVendExternalItem_ds.filter() method where you will use the VendAccount variable as the data to filter on. The field to filter on here is the CustVendRelation field. After that make add the following method calls:
This.selectMode(CustVendExternalItem_ItemId);
CustVendExternalItem_ItemId.setfocus();

The above should be compiled, and is now ready to be set as the lookup form. Next we want to move to the Itemid field on the Line Grid for the Purchase Order form. We want to here, override the lookup() method. From within this method you want to do something similar to this:

Args args = new Args();
FormRun itemLookUp;
;

args.name(formstr(POVendItemLookup));
args.parm(purchTable.OrderAccount);
itemLookUp = new FormRun(args);
itemLookUp.init();
this.performFormLookup(itemLookUp);

The above code will then launch the new form as the lookup form. Now you have given a form that is filtered by the Vendor account. This form also allows for searching based on the Vendor item number and description.

To take this further code could be added that would check the ItemId field to make sure that an item it truly only associated with a given Vendor account. Also you can do a lot with the lookup form itself, by adding tabs, and different “types” of the ItemId look ups based on the business process and need.

Hopefully this will get you started on replacing the lookup forms, and hopefully you can see what a great benefit this can be. Look here for future code examples, 4.0 details, and my review of the book by Scott Hamilton.


Find a job at: www.DynamicsAXJobs.com

AxaptaJobs.com Update

Well the new year has been pretty good to AxaptaJobs.com (soon to be DynamicsAXJobs.com).

In the past month alone we have had 4 active jobs posted, with a lot of hits from a lot of different job seekers. Speaking of job seekers, or resume database as grown now just under 200. At the rate it is growing, we will hit 200 job seeker resumes within the next week or so.

Thanks to everyone who is involved, as who has helped make that site a worth while project to do.

Find a job at: www.DynamicsAXJobs.com

Monday, March 06, 2006

Dynamics AX (4.0) Business Connector

What of the great things I hear that Microsoft has done with the next release of AX is revamp and redo the Business Connector. For those of us whom have developed solutions and integration into Axapta using the COM+ Business connector we all know that it can be strange, or act strange and flaky at times.

With the next release though MS has created the .Net Business Connector in which native .Net calles, and references can be made, instead of working with a COM object. Of course backwards support is being carried over, so that solution that have been developed using the COM+ objects can still be used.

What this means for us developers, is a more stable and easily accessiable interface into Axapta. I have not had the pleasure yet to do some example code work with it, but I know this is a great step forward. Also this means that the Enterpriese portal (which is re-written in ASP.Net) will function better because it is soley based on the performance of the Business connector.

Look here for more post about the furture of AX, and for everything else related to AX.

Find a job at: www.DynamicsAXJobs.com

Friday, March 03, 2006

Speeding up Zipcode lookup form

Have you ever looked up a new zipcode within axapta and it takes forever to actually take you to the one you entered? Well below is code that you can use that replaces the lookup, and only pulls in what you have typed:

// Changed added that will make the lookup faster based on what is typed in - JBG -
if(CallerAddressMap.ZipCode != "")
{

zipCode_ds.query().dataSourceTable(tableNum(ZipCode)).addRange(fieldNum(ZipCode, ZipCode)).value(CallerAddressMap.ZipCode);

}
// END

So with this you get only the addresses you are looking for to pull up, plus it happens a whole lot faster.

Well look for more code, To Increase posting, and my review of the book by Scott Hamilton "Managing your Supply Chain with Axapta"

Find a job at: www.DynamicsAXJobs.com


Copyright 2005-2011, J. Brandon George - All rights Reserved