Monday, 16 October 2017

Move Customization project to Source Control/Another Server

Hi There,

When you are doing customization it is usually much faster and easier to start it using Acumatica Customization Browser and even create an extension library from there.
But later, you might need to move customization somewhere:
  • to source control folder 
  • to another production/testing/development server
  • to use Acumatica ERP instead of framework.
In this article I want to show you how to link all the things together if you move it.
Customization usually consists of 2 things:
  • Customization package - just a zip file that contains all the changes that should be applied during customization publication.
  • Sources of extension library - that is something that should be kept outside of customization package and require additional movement.

Lets check how can we move sources.
1) Move sources files : First step is to find where your sources are located in - in my case it is c:/Program Files/Acumatica ERP/InstanceName/App_Date/Projects
Than I just can copy these files and move it to by Git folder. Please note that you can exclude some files, like "Solution.bat" or "binding.txt" what is needed just for opening project from Acumatica UI.

2) Update Site: Nest step is open project and update Site and  DLLs references. To that you need to delete old references and add new one. 
Delete old site and Add Existing site using appropriate menu in Solution Explorer
Please note that site is references from solution file using relative path. If you move solution to another folder it relative path would point to different destination. That may cause some issues in case it points to disc root. To solve that I recommend to remove site project before moving folder.

3) Link Site and Library: Add a reference from Site to your custom Library by clicking on bin folder and Add Reference
4) Update Acumatica Core Reference: here we need to delete old references and add new for following libraries:
  • PX.Data.dll - core of Acumatica Framework
  • PX.Common.dll - some shared feature for Acumatica core
  • PX.Objects.dll - Acumatica ERP business logic


5) Compile. Not it is good time to compile and check that it works fine.
Also it would be great to check that your extension library appears in new site/bin folder.

6) Link Project and New Library - to support Acumatica Customization Automations like move code to extension library you also need to link project on your dev environment with new location of solution file.

7) Add solution to source control - that totally depends on your source control system. In my case it is Git.

Have a great development!

No comments: