Archives / 2014 / February
  • Acumatica unit test

    Hello readers of mine blog.

    Today I want to share with everybody who wants to make unit test of Acumatica how I achieved it.

    For unit testing I use NUnit. In order to start my work with Acumatica Unit testing I wrote the following class:


    public class CATranEntryExtTest



    public void TestAutonumber()


    var gr = PXGraph.CreateInstance<CATranEntry>();



    Now with help of Resharper let's start debugging:

    And here we go, the first error message:

    PX.Data.PXProviderException : Provider cannot be instantiated.

       at PX.Data.PXDatabase.get_Provider() in c:\Builders\4_10-2013_12_16-23_17_15-Full\ … more

  • Acumatica security


    this post is dedicated to understanding how security in Acumatica works. If to be precisive security of accounts. 

    Let's say you need in some way filter accounts for some user according to configuration at row level security screen ( GL104000 ).

    In my case I had following records in database which correspondent to the following numbers:

    Relation group mask : 16; 0; 0; 0

    User group mask: 159; 96; 0; 0

    Account group mask: 16; 0; 0; 0

    How to join them? They are joined not by separated table, which has relations between groups and accounts or groups and users, but with usage of bit mask. It's very effective way to join and is much faster then holding adta in db. But the most … more

  • Autonumbering in Acumatica second way

    In one of my previous posts I described how to add autonumbering to acumatica. Described method will work pretty well, if you don't have any pop-ups which also need to have autonumbering. In case if you have such pop-ups, then it is different story.

    My next assignment on the job was to add autonumbering to the screen "Fund Transfers" which is marked as "CA301000" to the field Document ref at three places:

    The first two places are "Document ref" at the form. Third place or pop-up window will appear, if you press at button Add Expense. So my task was to make autfill of those text fields with some id. 

    For adding some init options to some fields at form we need to use following convention: … more