• About

Day 2 Day Dynamics

~ Experiences of a working AX developer

Day 2 Day Dynamics

Tag Archives: Combine XPO

Combine-AXXPO custom PowerShell function

02 Thursday Jul 2015

Posted by John Hagler in Powershell

≈ 4 Comments

Tags

Automation, AX, AX 2012, Build Scripts, Combine XPO, Dynamics AX, PowerShell, Team Foundation Server, TFS, XPO

The Combine-AXXPO custom PowerShell function will create a single .xpo file from a directory containing .xpo files.  It is used in my build process to take the .xpos that are in TFS and combine them into a single file for import by model.

This is a fairly simple function that calls the Combine XPO tool.  As of AX 2012 R2, this tool is available in the Microsoft Dynamics AX\60\Management Utilities folder.  If you have been following my earlier posts, the path for the location is included in your profile already with .”C:\Program Files\Microsoft Dynamics AX\60\ManagementUtilities\Microsoft.Dynamics.ManagementUtilities.ps1″.  If you are using a version of AX earlier than 2012 R2, you will either have to add the tool here or include the location where it is in your profile.

This parameter takes between 2-11 parameters:

  • XpoDir (The directory holding the .xpos to be combined)
  • CombinedXpoFile (The output .xpo file)
  • SpecifiedXpoFile (A file that specifies which .xpos to combine)
  • NoDel (Allows DEL_ fields to be included for objects specified in the file)
  • utf8 (Sets the encoding of the output file to utf-8)
  • Threads (Specifies the number of threads to use for processing)
  • ExclusionsFile (A file that specifies which .xpos not to combine)
  • ViewsOnlyOnce (A parameter that can increase performance at the cost of reference errors)
  • SMTPServer (SMTP server to use to send the email)
  • MailMsg (Net.Mail.MailMessage object used to send the email)
  • VariablePath (Path to a file used to default the parameters/variables)

This function can be found in Codeplex.  The steps of this function are:

  • Load the variables if a VariablePath parameter is used
  • Generate the CombineXPOs.exe call based on the parameters passed
  • Run CombineXPOs.exe
  • Send the success/fail message
Follow Day 2 Day Dynamics on WordPress.com

Day 2 Day Dynamics

  • RSS - Posts
  • RSS - Comments

Follow me on Twitter

My Tweets

Recent Posts

  • Minimizing Database Calls
  • Push-AXModel custom PowerShell function
  • Clean-AXModel custom PowerShell function
  • Get-AXTFSCombinedXpo custom PowerShell Function
  • Refresh-AXAifPort custom PowerShell function

Archives

  • February 2016
  • December 2015
  • November 2015
  • October 2015
  • September 2015
  • August 2015
  • July 2015
  • June 2015
  • May 2015
  • April 2015
  • March 2015
  • February 2015

John Hagler

John Hagler

John Hagler

I am the Dynamics AX Technical Architect at Dealer.com. I have been working with AX since Sep. 2006, starting with Axapta 3.0. I have worked as both a VAR and an AX customer.

View Full Profile →

Blog at WordPress.com.

  • Follow Following
    • Day 2 Day Dynamics
    • Already have a WordPress.com account? Log in now.
    • Day 2 Day Dynamics
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar