Blog

Here I document some issues for searching of which I spent more then 15 minutes

  • DeletedDatabaseRecord in Acumatica

    Hello everybody,

    today I want to write few words about interesting feature of Acumatica: column DeletedDatabaseRecord. As you may know plenty of ERP systems have strategy of holding everything that ever passed through them, and even if user has huge desire to ask ERP system to forget something via deletion of some entity, ERP "pretends" that record was deleted, but leaves it in db. 

    From this standpoint Acumatica can be exception. It allows to preserve records that lived inside of it. Allows mean can preserve or not preserve. 

    How programmer can achieve this kind of behaviour? Via column DeletedDatabaseRecord. 

    If you want Acumatica to hold some kind of entities in db, just add this … more

  • Multithreading in Acumatica

    Hello everybody,

    today I want to say a few words about my practice of usage Multithreading in Acumatica. I have a dedicated server which has 40 cores. And I have a need to read plenty of records from some other system. General schema is like this:

    Create some graph instance.

    Fill created graph instance data views with needed data

    At created graph instance call method graphInstance.Actions.PressSave();

    And that schema is perfectly workable, but for my disappoitment my 40 cores were not busy at all with doing something useful. So I had to figure out how to use them more fully. 

    Here are some fragments of code that I've used:

    int numberOfLogicalCores = Environment. … more

  • Some notes on Buttons creation in Acumatica

    Hello everybody,

    today I want to write few words about buttons usage in Acumatica.

    So, first of all, if you just need to add button at your form, you can use following syntax:

    public PXAction<PrimaryDACClass> SomeAction;

    [PXButton(CommitChanges = true)][PXUIField(DisplayName = "Some Action")]protected virtual void someAction(){      ...}

    Following syntax will create a button for you in the top buttons panel of Acumatica.

    Take note of CommitChanges=true attribute. In case if you need just some activity without persistance to database, then you can set it to false. But if you want button to save some changes to database then set it always to true.

    There is one more way of declaring … more

  • How to make back up of db smaller in MS SQL

    Hello everybody,

    today I want to document one hack that preserved me plenty of space on my hard drive.

    Recently I've tried to make back up of production database and was shocked to see that it had almost 200 Gb on my hard drive.  So it made me wonder how can I have smaller backups. 

    And here is the solution.

    In Microsoft SQL Server Management Studio click on database, and choose new query

    enter there following command: sp_configure 'backup compression default', 1

    then this: reconfigure WITH OVERRIDE;

    After such manipulations I've got back up that had only 27 Gb. more

  • Some digging in tables of Acumatica

    Hello everybody,

    today I want to document one useful sql query that can be beneficial for cases if you need to dig in Acumatica tables, and need quickly to find type of some particular column.

    Here it is:

    select * from information_schema.columns where table_name = 'SOLine' and COLUMN_NAME like '%OrderQty%'

    that sql will let you know all information about column OrderQty. more

  • Types of learning in AI

    Hello everybody,

    today I want to make a short notice on question that I often receive: what kinds of learning exists in Machine Learning. I want to provide simple answer:

    Learning with teacher: questions and answers.

    Learning with teacher: just questions

    Partial learning: questions, and some of them with answers

    Active learning: at which object you'll get an answer

    I suppose maybe some variations of this also exists, but as usually ML in one or another way manipulates with those four. 

    Consider example of clusterization. You have some data set of values. And you need somehow to group them or in other words find groups of similar objects. This task has two problems: nobody know … more

  • Unit test Acumatica PXGraph

    Hello everybody,

    today I want to make another description of how to cover with Unit Tests Graphs in Acumatica. 

    First of all I want to say that Acumatica controllers or as Acumatica names them graphs do not have any way to inject any dependency from interface. In such case it can be useful idea to use Microsoft Fakes library. 

    So in order to unit test Acumatica code you will have a need to make mix of Acumatica code with Microsoft shims. Imagine that you have following graph declaration:

    public class PAllocs : PXGraph<PaymentsAllocation>

    and somewhere in your graph you have method like this:

    [PXButton(Tooltip = "Saves values from grid")]

            [PXUIField(DisplayName = "Save" … more

  • Stubs vs Shims difference

    Hello everybody,

    today I want to mention difference between two kinds of testing. Shim vs Stub. 

    Take a look at the following code sample:

    // Stub sample

    public interface IDependency

    {

        void SomeMethod();

    }

    // Take note that class TestTarget allows to inject 

    // interface IDependency

    public class TestTarget

    {

        private IDependency _dependency { get; set; }

        public TestTarget(IDependency dependency)

        {

            _dependency = dependency;

        }

        public void TestMethod()

        {

            _dependency.SomeMethod();

            

        }

    }

    // Shim sample. Take note that class ShimTarget doesn't allow to inject 

    // interface as dependency

    public class Dep :  … more

  • Types of screens in Acumatica

    Hello everybody,

    today  I want to describe one more feature of Acumatica: types of screens in Acumatica. In Acumatica majority of screens are the following:

    Data Entry pages

    Maintenance pages

    Inquiery pages

    Setup pages

    Processing pages

    Reports.

    Now let's talk in more details about those screens:

    Data entry pages

    As usually data entry pages located at following icon in the red rectangle.

    These pages are the most frequently used pages of the Acumatica. Typically, data entry pages are used for the input of business documents, such as sales orders in a distribution module.

    Maintenance pages

    As usually maintenance pages located at following icon in the red rectangle. … more

  • Types of controls in Acumatica

    Hello everybody,

    today I want to describe with some screenshots kind of controls that you can get from Acumatica developer like me or any other Acumatica programmer.

    Main purpose of this blog post is the following. Imagine, that you want to write super detailed instructions for Acumatica developers. After reading this article I suppose you'll be able to write instructions to them with any kind of detalization. Or even super detailed.

    First of all, I want to point that as usually Acumatica pages consists of two parts: top and bottom. Top part often is named summary, and bottom is considered to be detalization of top. Take a look at following screenshot:

    At presented screeshot red part … more

General information

Greetings to everybody stopping at my blog. Purpose of this web site is to be google of my brain. Everything I found useful, or of possible beneficial for usage in future I've save here at this blog

Contact information

If you want to contact me more on any subject printed at this web stie, you can email me: zaletskiy(at)gmail.com

Job information

If to speak in general, I'm developer. For now I work as team lead in company GlobalLogic.