PXCommandLine Tool: General Information
The PX.CommandLine tool is a console application that can be used to work with customization packages in automated scenarios, such as continuous integration (CI) scripts. It gives developers the ability to integrate a number of operations that are performed in the Customization Project Editor into scripts—such as building, uploading, and deleting customization projects.
Learning Objectives
In this chapter, you will learn how to do the following by using the PXCommandLine tool:
- Run validations of all
PXGraph
andPXCache
extensions in the current application domain - Upload and publish a customization package to the website
- Validate a published customization project before upgrading your MYOB Acumatica instance
- Unpublish customization projects from the website
- Build a customization package that uses existing files or is based on a customization project
- Delete a customization project from the instance and from the instance's database
- Merge multiple customization projects into a single customization project
- Export a snapshot
- Run the
CustomizationPlugin.UpdateDatabase
methods from customization plug-ins of all published customization projects - Update the pages and files of the website by using a customization package file
Applicable Scenarios
You use the PXCommandLine tool if you need to work with customization projects in automated scenarios.
Use of the PX.CommandLine Tool
The PX.CommandLine tool is an executable file (PX.CommandLine.exe) located in the \Bin folder of your customization project.
When you run PX.CommandLine.exe
, you supply a set of command-line parameters,
with each presented in the following format.
parameter_name "parameter_value"
The tool also supports parameters of the Boolean type that do not have a corresponding value,
such as the /replace
parameter in PXCommandLine Tool: UploadCustomization.
The PX.CommandLine tool supports the following syntax.
PX.CommandLine.exe
[/website "path\to\web\site\root"\]
/method (ValidateExtensions | UploadCustomization | ValidateCustomization |
RemoveCustomization | PublishCustomization |BuildProject | DeleteProject |
MergePackages | ExportSnapshot | RunPluginsUpdate | UpdatePages)
You can use the following parameters:
/website
: Optional. This parameter provides a path to a website folder. You use the parameter if the PX.CommandLine.exe executable file is not located in the \Bin folder of your website./method
: Required. This parameter indicates the action that should be executed. The following topics describe the possible values for the parameter and their usage:- PXCommandLine Tool: ValidateExtensions
- PXCommandLine Tool: UploadCustomization
- PXCommandLine Tool: ValidateCustomization
- PXCommandLine Tool: RemoveCustomization
- PXCommandLine Tool: PublishCustomization
- PXCommandLine Tool: BuildProject
- PXCommandLine Tool: DeleteProject
- PXCommandLine Tool: MergePackages
- PXCommandLine Tool: ExportSnapshot
- PXCommandLine Tool: RunUpdatePlugins
- PXCommandLine Tool: UpdatePages
Additionally, each action that is executed by using the /method
parameter and
the corresponding value has its own set of additional parameters. These are also discussed in
the topics that are listed above.