How to start with Acumatica development

Hello everybody,

this post is intended for those people who want to make development for Acumatica, but don't know where to start or how to start. Or for those, who know C#, but absolutely can't figure out how to work with Acumatica.

So, first of all, I'll describe some general ideas, and then provide few examples of how development for Acumatica is done.

Acumatica has the following development or extension schema.

  1. Acumtica is installed on some IIS server. Further in this document I'll name it production instance or production.
  2. Developer installs Acumatica on hiw working computer with IIS. Without IIS development for Acumatica will not be possible
  3. Developer creates his extensions
  4. Developer packs his extensions in customization ( it's actually zip file )
  5. Developer of production instance admin publish customization at production.

Now each step in more details. 

Steps 1 and 2 should be done with "Acumatica ERP Configuration Wizard". If you have question where you can get it, then follow this link. Then following steps.

  1. Choose needed Acumatica edition
  2. Download file from AcumaticaERP folder
  3. Download file from AcumaticaFramework
  4. Execute each one of them
  5. At startup menu you'll get "Acumatica ERP Configuration", like this:

6. Install new instance of Acumatica with help of wizard. This steps should be done at developer machine and at server. 

N.B. if you have temptation to install Acumatica at server, and then copy/paste files to your dev machine, forget about this desire. You'll create a lot of untrackable and not understandable bugs. 

Now let's move to step 3, or 

Developer creates his extension

First of all, I'd like to point that there are few ways of creating extensions. And I'll describe the one that I prefer, but in T200 and T300 manuals described a bit another way. So, if you want more user understandable way, then you can refere to those manuals and use what is described in that manuals. But here I describe what I do because for me it's more convenient.

First of all, for development in Acumatica you'll need some edition of Visual Studio. Here I'll provide development process with Visual Studio 2015.

  1. Start Visual Studio 2015
  2. Create an empty solution:
  3. Add reference to Acumatica instance created with "Acumatica ERP Configuration Wizard" like at screenshot:
  4. It can be like this:
  5. Create new C# Class library. 
  6. In your class library add references to all PX dll's of your installed Acumatica instance:
  7. Then left click on Bin folder of your web site:
  8. Choose Projects/Solution and check your class library:
  9. Now you all set for development

Lets go to next step: 

Developer creates his extension

For now I'll provide initial steps for this stackoverflow question.

At this question big_water tries to create web hook for shipment. Shipments are managed by form SO302000. So, we will need to modify controller of this form. In Acumatica controllers have another name, instead of word controller another term is used: graph.

Let's find, which controller to override. For this 

  1. Open in visual studio file  SO302000.aspx
  2. Typename, that we need to extend is the following: PX.Objects.SO.SOShipmentEntry
  3. Navigate to your class library and choose add new class. Let's give it a name SOShipmentEntryExt
  4. Create initial code like this:

using PX.Data;
using PX.Objects.SO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Shipment
{
    public class SOShipmentEntryExt : PXGraphExtension<SOShipmentEntry>
    {

    }
}

6. Modify your class to the following view:

using PX.Data;
using PX.Objects.SO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Shipment
{
    public delegate void PersistDelegate();
    public class SOShipmentEntryExt : PXGraphExtension<SOShipmentEntry>
    {
        public void Persist(PersistDelegate baseMethod)
        {
            baseMethod(); // calling this method will preserve your changes in db

            //here should go your code, that will send push/pop/delete etc web request into your asp.net application. Or in other words your web hook.
        }
    }
}

After successfull development, you can create customizations. How to create customizations, I've described here and here

1 Comment

  • darius said

    thx a lot for your clear explanation. hi i am from Indonesia, just start to learn acumatica

Add a Comment