Contents tagged with Acumatica

  • How to pass data into processing method with help of lambda expression

    Hello everybody,

    today I want to leave a short note on how to pass some additional parameters into Processing method of processing page with help of lambda expression. Syntax is pretty simple:

    public class SSShipmentDateResetter : PXGraph<SSShipmentDateResetter>


    public PXFilter<ShipmentFilter> ShipmentFilter;

    public PXFilteredProcessing<SOShipment, ShipmentFilter> ShipmentsForProcessing;

    public SSShipmentDateResetter()


    var shipmentFilter = ShipmentFilter.Current;

    ShipmentsForProcessing.SetProcessDelegate(shipments =>


    ResetDate(shipmentFilter, shipments);



    public static void ResetDate(ShipmentFilter filter,  List<SOShipment> shipments)

    { … more

  • How to work with unbounded DAC in Acumatica

    Hi everybody,

    today I want to leave a short note on how to deal with Unbounded DAC classes in Acumatica. Unbounded in other words means DACs that doesn't have dirrect persising target in database.

    For Unbounded DAC classes to work like this, two steps are needed:

    Add attribue [PXVirtualDAC] to PXSelect or PXSelect.....

    Add attribute PXVirtual over your DAC class declaration

    With those two details you'll have complete independence of your classes from Database. more

  • How to restore snapshot of Acumatica

    Hello everybody,

    today I want to leave a post on how to restore Acumatica snapshots with help of Acumatica Wizard.

    Before creating snapshot you may need to switch Acumatica to maintenance mode. Below are the steps for achieveing it:

    1. Go to System --> Management --> Apply Updates, click on the button "Schedule Lockout" and specify the reason for lockout 2. Don't forget to remove the lockout after you'll restore Snapshot.

    Steps are the following:

    1. Create a snapshot of the tenant you wish to back up

    2. Export that snapshot (I recoment  xml format).

    3. In the folder where the corresponding Acumatica Wizard is installed (usually c:\program files\Acumatica ERP\), find the folder … more

  • How to enable some control in Acumatica

    Hello everybody,

    today I want to leave a short note for the following situation:

    Imagine that you need to enable some control in Acumatica ( for example Mark for PO ) on page Sales orders ( SO301000 ).

    As usually for enabling control there are two ways:


    Automation steps.

    Recently I found third option, when neither 1 nor 2 did work. After spending some time I found third option: Cache has property AllowUpdate. After I've set it to true, I was able to modify lines in Document details. 

    In your code it may look like this:

    protected void SOLine_RowSelected(PXCache cache, PXRowSelectedEventArgs e, PXRowSelected del)


            if (del != null)

                  del(cache, e) … more

  • New syntax of SetVisibility method in Acumatica

    Hello everybody,

    today I want to write a few words about changes of PXUIFieldAttribute.SetVisibility method. 

    In the past, if you wanted to turn on some column, you could write in RowSelected event something like this:

              PXUIFieldAttribute.SetVisibility<APRegister.finPeriodID>(Documents.Cache, null, true);

    If you want to turn it off, then this:

    PXUIFieldAttribute.SetVisibility<APRegister.finPeriodID>(Documents.Cache, null, false);

    But for quite a long time ( even in 2017 version ), Acumatica team introduced PXUIVisibility enum. In code it looks like this:


    public enum PXUIVisibility


      Undefined = 0,

      Invisible = 1,

      Visible = 3,

      SelectorVisible = 7,

       … more

  • How to change all emails in Acumatica

    Hello everybody,

    today I want to leave a post on how to change all emails, which are contained in Acumatica. For this purpose you may use script below:

    UPDATE contact SET    email = email + '.ts' UPDATE socontact SET    email = email + '.ts' UPDATE apcontact SET    email = email + '.ts' UPDATE pocontact SET    email = email + '.ts' UPDATE crcontact SET    email = email + '.ts' UPDATE arcontact SET    email = email + '.ts' UPDATE fscontact SET    email = email + '.ts' UPDATE crcasecontacts SET    email = email + '.ts' UPDATE crcontact SET    email = email + '.ts' UPDATE pmcontact SET    email = email + '.ts' 

    If you wonder, what can be the usage of such SQL, consider following … more

  • Required of BQL in FBQL of Acumatica

    Hello everybody,

    today I want to describe how analogue to Required works in Acumatica Framework.

    For example, in the past ( before 2019 R1 ) you may read something from Acumatica with help of Required:

    var contact = PXSelect<Contact, Where<Contact.displayName, IsNotNull, And<Contact.displayName,  Contains<Required<Contact.displayName>>>>>.SelectWindowed(graph, startIdx, 1, ' ').First();

    Now, you can use @P.AsString, as shown on code sample below:

    var contact = SelectFrom<Contact>.Where<Contact.displayName.IsNotNull.And<Contact.displayName. Contains<@P.AsString>>>.View.SelectWindowed(graph, startIdx, 1, ' ').First();


    Also take a note, that … more

  • Different methods of PXInstanceHelper class in Acumatica

    Hello everybody,

    today I want to document one important class in Acumatica: PXInstanceHelper.

    I have found it long time ago, but finally time arrived to show how it works and what features it has. So, PXInstanceHelper include such methods:

    Method AppDataFolder.

    In code it looks like this:

    var result = PXInstanceHelper.AppDataFolder;

    Screenshot of it's execution may give you additional hint of what it does:

    This method returns physical path to folder App_Data inside of Acumatica instance. As you can see from the screenshot, on my dev machine App_Data folder lives at

    C:\Program Files\AcumaticaERP\InstanceHelperDB\App_Data

    2. Method CurrentCompany.

    In code looks like this: … more

  • How to use F-BQL view instead of PXSelect

    Hello everybody,

    today I want to leave a short note on how to use F-BQL version of PXSelect in Acumatica.

    In past it was common to have this line of code in your graph:

    public PXSelect<Student1> Students;

    In new F-BQL introduced new construction, SeleftFrom. Proper way of using it is this:

    public SelectFrom<Student2>.View Students;

    Take notice of suffix .View. Without that suffix you'll not get proper F-BQL view. And Acuminator will give you this warning:

    So if to summarize, don't forget to add suffix .View


  • How to download DAC schema browser

    Hello everybody,

    here is just short post on how to download DAC Schema browser which I recently opensourced.

    You'll need two steps:

    Navigate in your browser to link

    Click on Star as displayed on screenshot (this is optional step):

           4. Right mouse click

           5. Save customization wherever you wish

           6. Publish on your local instance

    That particular file is intended for Acumatica version 2019 R1 build 0122, but it should work on higher versions as well. Later on I'll add lower versions as well. more

  • How to get list of all Acumatica tables

    Hello everybody,

    today I want to share single line of code, which I found recently while digging Acumatica source code with reflector. Sometime you may need to know if there is some or antoher Acumatica table available. For example if you create some customization plugin. How to find out if there is some table? You can use following line of code for this purpose:

    using PX.Api.Soap.Screen;


    var acumaticaTables = ServiceManager.Tables;

    Variable acumaticaTables will have a list of Acumatica tables.


  • Configuration Error for Acumatica T100 training

    Hello everybody,

    once upon a time Acumatica requires for certified developers to pass over certification again. 

    As obedient person I decided to install T100 sample application over Acumatica Framework Configuration ( don't mix with Acumatica ERP Configuration ). Then I navigated to just installed application, and here is what I've seen:

    Server Error in '/T100a' Application.

    Configuration Error

    Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Message: The connection string name is missing for the … more

  • How to call action Cancel in Acumatica

    Hello everybody,

    Today I want to leave a short notice on how to call Cancel button of Acumatica from inside C# code:


    That is it, Clear method is binded to button Cancel in Acumatica. Besides that Clear method will reload current data record from database and rolls back changes of Cache objects. more

  • PXUIRequired attribute usage in Acumatica

    Hello everybody,

    today I want to say a bit more about usage of attribute PXUIRequired as previous article on my blog wasn't very easy to follow by some of my readers.

    Take a look on presented code sample:

    public class sOOrderType : Constant<string>


    public const string SOOrderType = "SO";

    public sOOrderType() : base(SOOrderType)




    public class SOOrderExt : PXCacheExtension<SOOrder>


    [PXMergeAttributes(Method = MergeMethod.Append)]


    [PXUIRequired(typeof(Where<SOOrder.orderType, Equal<sOOrderType>>))]

    public virtual string CustomerOrderNbr { get; set; }


    As you can see, besides attribute PXUIRequired it has declaration of constant value "SO". … more

  • How to extend Persist of your own graph in Acumatica

    Hello everybody,

    here I want to leave a short line on how to extend Perist method of your own graph.

    I described once long time ago how to override Save action in your extension, but sometime it can be needed to override Persist in your own graph.

    Sometime it can be necessary. Below goes sample of code for this purpose:

    public override void Persist()


    //Some other custom business logic



    Here you go.


  • How to compare Acumatica objects without ObjectsEqual

    Hello everybody,

    Long time ago I made a post on how to extend if needed method  ObjectsEqual in Acumatica.

    today I want to extend my answer a bit more and share with you class OneLevelComparer. With help of this class you may check if some object was changed without need of typing all fields of DAC class. Take a look on the class itself:

    /// <summary>

    /// Comparison of two objects on equality based on reflection. 

    /// Doesn't support inner collections, objects.

    /// </summary>

    public static class OneLevelComparer


    // Item1: property name, Item2 current, Item3 original

    public static List<Tuple<string, object, object>> Differences<T>(T current, T original)


    var diffs = new  … more

  • Closest possible to database approach in Acumatica

    Hello everybody,

    today I want to leave another post about internals of Acumatica, about which you may heard something like "Never try it at home". In another words, sometime you may need to do the following in Acumaitca:

    Insert directly into database ( for this purpose I'd recommend you to use PXDatabase.Insert )

    Alter Table

    Alter Schema of Table

    Create column

    Drop column

    Drop Table

    .... this list is not exhaustive

    and any other system level activities. By default and for SOLId SOLID SOLID reasons you can't achieve it. But sometime you may need it. 

    Below goes sample of code, which you can use for setting identity insert to on, and then execute some update onf the table, and … more

  • How to call RecordCCPayment action from Screen Based Web API call in Acumatica for Payments and applications screen

    Hello everybody,

    today I want to write a few words with code samples on how to work with Screen based web API in Acumatica. 

    Stage preparation

    Before you go, first step that is needed is to have Acumatica instance ready. So install Acumatica with sales demo database.

    As mentioned in the title of the article, I'm going to work with "Payments and Applications" screen ( AR302000 ) and with Action Record CC Payment: 

    As usually in cases of WEB API calls in .Net, you'll need somehow to create Web Reference. 

    For Record CC Payment following sequence of Actions is needed.

    In Acumatica instance navigate to page AR302000, and click there on Help -> Web Service:

    2. Copy into clipboard … more

  • Submition types in Acumatica

    Hello everybody,

    today I want to leave a really short notice on how you can submit data into Acumatica. There are three ways:

    Contract-based REST API

    Contract-based SOAT API

    Screen-based SOAP API

    Historically the first was screen based SOAP API, and with time two others were added. Later on I hope to add description of others as well. more

  • Where log of Visual Studio is located

    Hello everybody,

    today I want to leave a short note on where to search for log file of Visual Studio. 

    It lives here:

    C:\Users\{USER}\AppData\Roaming\Microsoft\VisualStudio .....\{visual studio version}\ActivityLog.xml

    Whenever I speak about log files with any kind of developer, I see round eyes and trembling voice with a question, why on earth should I look into log file?

    The reason is simple, sometime you may get error message like this: "Error HRESULT E_FAIL has been returned from a call to a COM component" during adding reference to your class library. 

    What may stand behind that error message? No ideas? The same was with me, but after looking into log file, we have found there … more