Total Pageviews

Search This Blog

Loading...

Monday, October 31, 2011

Visual Studio 2010 Error The Product key cannot be used to extend the use of this product

After a gap of few weeks, today when I fired up Visual Studio 2010 Professional on my lappie, it showed me a dialog box, to obtain a new license key to extend the trial version.

As usual, I tried obtaining a new license online and pasted this key in the activation window and hit Activate button, but no luck, it keeps on throwing this error:


"The product key cannot be used to extend the use of this product"

Searched on the internet and came to this msdn forum http://social.msdn.microsoft.com/Forums/en-HK/vssetup/thread/518bc51d-56e1-4224-89d0-0645808d6b78 which eventually took me to this link, which proved very useful to troubleshoot the above error.

http://www.mydigitallife.info/master-product-key-to-upgrade-activate-visual-studio-2010-ultimate-premium-and-professional/


Tip:  You can directly use the master key mentioned in the above link, it starts with YCFHQ..., just google it and you are good to go ;-)

Wednesday, October 26, 2011

Error executing code: The field with id 0 does not exist in table

Had been busy past couple of days as was involved in writing a complex API which looks onto the Inventory Cost Breakdown tree and writes the data into a custom table after doing some transformation of data on the go.

As I was developing, I bumped into this run time error:

Error executing code: The field with id 0 does not exist in table



















Investigation:

As usual, I googled about this error and came across this blogpost here http://daxline.blogspot.com/2011/08/field-with-id-0-does-not-exist-in-table.html, It's the exact error but the circumstances were different, It talks about the missing field in map whereas in my case I was not using any Maps.


Solution:

It didn't took me long to troubleshoot the issue as I figured out that the table buffer was getting populated incorrectly, meaning I was inheriting the standard AX InventSettlementTreeNodeCalc class for my API and internally, it was calling a method for calculating the adjustments which I didn't require at that stage in the process, and this adjustment call was populating the settlement table buffer and returning it to Inventtrans table buffer thereby giving a run-time error.

Corrected the table buffers and removed the extra call to calculate adjustments as I was doing it towards the end of the process in a separate routine,


Tuesday, October 18, 2011

Dynamics AX 2012 Upgrade Q&A Link on Community Site

Dear All,

Glad to know that Microsoft Dynamics Community has come up with a new initiative so that partners, developers and end users who are planning to upgrade to AX 2012 can get some of their queries answered here.

Thanks for MS for providing me an opportunity to be part of the panel. From my experience with AX 2012 so far, I can see there's a huge amount of learning involved with this new release and such Q & A Sessions would foster more knowledge sharing among the community members thereby building a sound knowledgebase around the product.

I encourage you to visit the below link where you can start asking your questions

https://community.dynamics.com/b/communityteam/archive/2011/10/11/have-questions-about-upgrading-to-dynamics-ax-2012-get-your-answers-here.aspx

You can post all your queries between October 17th to October 21st and our community panel experts will try and answer them to the best of their knowledge.

Happy Daxing :)

Wednesday, October 12, 2011

Update - Inside Dynamics AX 2012 Videos (Videos #10,11 and 12)

The video series on "Inside Dynamics AX 2012" is complete now, with Videos on Simplicity, Workflow and Organization Model added.

http://daxdilip.blogspot.com/2011/08/inside-microsoft-dynamics-ax-2012.html

Would recommend you to bookmark it. Njoi :)

Tuesday, October 11, 2011

Update - Troubleshooting Dynamics AX 2012 Services Error Creation has been cancelled

Got heaps of exceptions when trying to invoke Dynamics AX 2012 Service from VS.Net

Below, is a snapshot from System Administration > Periodic > Services and Application Integration Framework > Exceptions














Errors:

a. Field 'Language' must be filled in
b. Field 'Currency' must be filled in
c. Item Number 1205 does not exist
d. Creation has been cancelled




Solution:

After some investigation, found that it was required to pass callcontext object explicitly after setting company and language from VS.Net as shown below:







Update: Figured out that we need not pass explicitly company and language information through code via callcontext, if the logged on user belongs to the company "ceu". In my case, the logged in user was pointing to "dat" so changed it to "ceu" in User Options form  and it works fine without callcontext.

Troubleshooting Dynamics AX 2012 Services - Error Reading Value of Type Date from XML

Troubleshooting Consuming Dynamics AX 2012 Services from .Net

Error Reading Value of Type Date from XML



Solution: Once I passed salesTable.ReceiptDateRequested from VS.Net to the service, then this error went away






How to Consume Dynamics AX 2012 Services from VS.Net

In this post, I will be covering How to Consume Dynamics AX 2012 Sales Order Service from Visual Studio .Net

A. Firstly, Create a Service Group in AX 2012 (Go to AOT > Service Groups > Create SalesOrderServiceGroup1 - in this case.)





















B. Next, drag and drop the SalesSalesOrderService from AOT > Services > to the newly created Service Group in Step A









C. Deploy the SalesOrderServiceGroup1


































D. Now, the Service should list in System Administration > Setup > Services and Application Integration Framework > Inbound Ports

























E. You should be able to browse the wsdl now.














F. Now Open Visual Studio, File > New Project Create a Windows Application (Windows Form or Console) and Add the above Service in  Service References node.







\





G. Below is a sample sales order input form (I just created a simple UI as the whole purpose here is to show how to consume Dynamics AX 2012 Services from VS.Net), so this UI takes customer, item and qty and creates an order in AX.


























H.  Below is the sales order view from AX















VS.Net Code:

Below is the .Net code which consumes the service. It's pretty much the same which we have been using with previous versions of Dynamics AX alongwith VS.Net i.e. It constructs the Sales Order Document and Entity Objects, then populates it, finally calling the create method.































Troubleshooting:

http://daxdilip.blogspot.com/2011/10/troubleshooting-dynamics-ax-2012.html

http://daxdilip.blogspot.com/2011/10/troubleshooting-dynamics-ax-2012.html


References:

Thanks to Murray for sharing this presentation which helped me with my demo.
http://www.slideshare.net/murrayfife/creating-and-consuming-web-services-in-dynamics-ax-2012

http://blogs.msdn.com/b/aif/archive/2011/06/15/microsoft-dynamics-ax-2012-services-and-aif-white-papers.aspx

Wednesday, October 5, 2011

Dynamics AX KB Articles made public

Dear All,

The KB Articles previously accessible only via PartnerSource/CustomerSource are now publicly available for people to view, Similar to other MS Technologies like .Net, SQL etc. 

Read more about it over here in Microsoft Dynamics AX UK Blog http://blogs.msdn.com/b/ukax/archive/2011/09/27/erp-knowledge-base-articles-made-public.aspx


Tuesday, October 4, 2011

Returning rowcount using SysTableRowCount Form in Dynamics AX

Accidentally bumped onto this form called SysTableRowCount in Dynamics AX, It's pretty handy to get the recordcount remaining in AX. And, it's there in all the 3 versions of AX: 4.0, 2009 and 2012. Good to know something new.

















Alternatively, if you have SSMS (SQL Server Management Studio), you can always fire, select count(*) from <tablename>