Skip to main content

Posts

Showing posts with the label Dynamics AX 2012

Understanding the data flow process between AX and eCommerce

thank you  Pete Ward In a previous post I walked through how to make changes to your online web catalog directly from Dynamics AX 2012 ( http://blogs.msdn.com/b/dynamics-coe/archive/2013/02/04/updating-your-commerce-catalog-directly-from-dynamics-ax.aspx ).  This powerful feature showcases the truly integrated, omni-channel retail solution that is Dynamics AX. In this post, I'm going to look at what's happening in the background and walk through the data flow of this process. So to begin, let's have a look at a very simple picture representation of some of the components involved in this process.  (and yes there are a number of elements involved that I've left off but this will get us started).   So let's step through what's happening when we publish our catalog to the web. Step 1: Publishing the catalog from Dynamics AX to the Commerce Run Time database When you publish the catalog in Dynamics AX and run the A-1075_OC job, the CRT Synch Service...

List content of a model to HTML using PowerShell

Building on  this post on listing elements in a model  and  this post on putting a list in a HTML file  I wanted to quickly just show an easy and quick way to create list elements in a model to HTML. The PowerShell command is easy, and the results are swift and usable. For this example I'm going to list the contents of a hotfix. (axmodel -model 'Hotfix-KB2909140-Foundation' -details).elements | select name, elementtype, path | ` sort path | ConvertTo-Html -CssUri http://skaue.com/ps.css | Out-File c:\KB2909140.html The HTML-file can be viewed using your favorite browser.

Consuming a Web Service in AX 2012 is easy

thank you JORIS DG For those of you who have read my post on the  Windows Azure App , may recall my shortcut for fixing the missing bindings and other app.config settings. I've been meaning to dig into this further and come to a solution, but for the Azure post being constrained by my promised " 10-minute  app " I stuck with the ugly solution. Recently I was talking with the MSDN  team about AIF related articles they are wanting to do, and I brought up this issue. They pointed out they had not seen this issue and asked if I had followed the  whitepaper on consuming webservices . Now, there's not necessarily a lot to it, but in looking over the whitepaper I found one tiny little thing, which makes a world of difference and solves my issue: AIFUtil class! This sparked the idea of doing a follow-up on this, and due to a late night conversation on  Twitter  related to this I figured I really need to get this on my blog. The issue as I'm about to explain ...

User security role assignment report [AX 2012]

There isn’t a report that lists the users and their security roles. You can get this information fairly quickly through Excel add-in. 1. Go to the AOT and find the Query SysSecRolesForUser. 2. Duplicate it and remove the code (it has code in the init method to filter by current user). Then just go the organization > “Document data sources”. Select your query and activate it. 3. In Excel select the service, select the fields and run. You should see a nice list of user and their roles.

AX2012: Error when downgrading the AX server kernel

Description:  It can happen that you need to downgrade the AOS kernel in a system. Depending on the build you are going back to, you might get an error message. Error message: Object Server 01:  Fatal SQL condition during login. Error message: "The internal time zone version number stored in the database is higher than the version supported by the kernel (4/1). Use a newer Microsoft Dynamics AX kernel." Solution: You need to change the value for the column value  SYSTIMEZONESVERSION  in the table SQLSystemVariables. If you look in the event viewer you can see that it finds the value 4, but expected 1 (4/1). So the solution is to change the value to 1. Author : Kim Truelsen

How to print the SSRS report in dynamics ax 2012 from code.

SrsReportRun srsReportRun;     // initiate the report.     srsReportRun = new SrsReportRun ( "InventTruckTransactionReport.PrecisionDesign1" );     srsReportRun.init();     srsReportRun.reportCaption( "InventTruckTransactionReport.PrecisionDesign1" );     // set parameters name, value.     srsReportRun.reportParameter( "TruckTransDS_JournalId" ).value( "000161_070" );     // suppress the dialog     srsReportRun.showDialog( false );     if ( srsReportRun )     {         // run the report         srsReportRun.executeReport();     }

AX 2012 SSRS Report: Multiple report design under Print management

AX 2012 SSRS Report: Multiple design under Print management If new formats for Sales order confirmation/Picking/Packing/Invoice Purchase order postings etc. are needs to be added. Following steps needs to be performed. Step1. Create new Design for report under visual studio Step2. Add code to method: \Data Dictionary\Tables\PrintMgmtReportFormat\Methods\populate Add Code in the before TTSCOMMIT: addOther(PrintMgmtDocumentType::SalesOrderPackingSlip, ‘SalesPackingSlip.Report_XYZ,’SalesPackingSlip.Report_XYZ’ ,’XYZ’); Step 3. Setup the Format under: AR -> setup -> form setup -> Print management -> Sales order Packing slip original -> report format to SalesPackingslip.Report_XYZ Step 4. New Report design can be executed from use Print management from Inquiry journal forms or during posting by selecting Print management destination.

Save SSRS report to pdf that uses Controller classes [Dynamics AX 2012]

static   void  SR_SaveReportToPDFFromController(Args _args) {     SalesInvoiceController  salesInvoiceController;     SalesInvoiceContract    salesInvoiceContract;     Args                    args =  new  Args();     SrsReportRunImpl        srsReportRun;     CustInvoiceJour         custInvoiceJour;     ReportName              reportName =  "SalesInvoice.Report" ;     ;      select   firstOnly  custInvoiceJour;     args.record(custInvoiceJour);      ...

Using the Cross company feature from the Business Connector.

Peter Villadsen   19 Dec 2008 8:59 PM  1 In Ax 2009 the new cross company feature was introduced. It allows the programmer to specify a container containing strings denoting company names to the crosscompany hint: container c = ['dat', 'dmo']; select crosscompany: c * from custtable where custtable.Name == "Jones"; That is all very well in X++, of course, but how do you handle it when accessing data through the business connector? The first approach would be to do something like the following: AxaptaRecord r = axapta.CreateAxaptaRecord("CustTable"); ax.ExecuteStmt("select crosscompany: ['dmo', 'dat'] * from %1 where %1.Name == 'Jones'", r); However, that will not work: The argument to the crosscompany hint is not an expression of type container, it is a variable of type container. Hence you cannot provide arbitrary expressions, only variable references. This was done to make the implementation of the ...

Issues concerning X++

Peter Villadsen   19 May 2011 5:29 PM  0 I was looking at the API that we publish for the X++ compiler, and it struck me that it would be really easy to implement a script host for X++. This is a program that allows you to execute arbitrary X++ code that is stored in files in the file system. In this way, you can use X++ as a systems programming language, starting things at particular times etc. I thought it would be fun to see what it takes to implement that command line tool. In the spirit of sharing, I am listing the C# code below. It is, after all, only just over 100 lines of code. Let's imagine that we have a file called MyFile.xpp containing the following: real f(int i, real r, str s) {     ;     System.Console::WriteLine("Hello world");     return i + r + strlen(s); } With the script host installed, you can do things like: C\> XppScriptHost  MyFile.xpp 3  3.141 "I am an argument". The script host w...

How to install CU7 for Microsoft Dynamics AX 2012 R2

Sally Erickson [MSFT]   11 Nov 2013 6:50 AM  0 CU7 for Microsoft Dynamics AX 2012 R2 is now available! We’ve recently blogged about its new features and the resources that are available to help you learn more about it. (In case you missed those blog posts, click  here  and  here .) But today I want to focus on one thing, and it’s kind of important: how to install it. There are two ways to install CU7. The method that you should use boils down to how you answer this question: Is Microsoft Dynamics AX 2012 R2 already installed in your environment? Yes, AX 2012 R2 is already installed If AX 2012 R2 is already installed, use the Update Wizard and complete the update process to apply CU7. The process looks like this: Get ready for CU7: Review the release documentation. Download the files. Apply CU7 as an update: Prepare for the update. Install and analyze updates. Restart the AOS and IIS. Reinitialize the model store. Complete the s...

Configure email functionality in Dynamics AX 2012

Sally Erickson [MSFT]   14 Oct 2013 7:19 AM You can configure Microsoft Dynamics AX to automatically send email notifications to users when specific events occur. For example, Dynamics AX can send email notifications to users when documents are assigned to them for approval (as defined by a  workflow ), or when sales orders are canceled (as defined by an  alert rule ). To configure email functionality in Microsoft Dynamics AX, you’ll need to connect Dynamics AX to an SMTP mail server, enter an email address for each user, set up a batch to send the email messages, and create email templates for the specific features that you’re using (such as workflows and alert rules). The process looks like this: For step-by-step instructions on how to set this up, see this topic on TechNet:  Configure email functionality in Microsoft Dynamics AX . For instructions about how to set up email and address settings for customer contacts, see  Set up collections...