Archives / 2019 / March
  • Most useful git commands

    Hello everybody,

    today I want to make post about most useful IMHO commands. Honestly speaking as usually I prefer to use tortoise git with it's gui. But quite often it happens that even the best gui tool can't give you necessary flexibility. For this purpose git commands come on your rescue. In this post I'll describe some basics of git, some most useful commands, so it's going to be one of my longest articles, and hopefully not the most useless.

    Configuring Git

    In git you can have three levels of configuration:

    --local  - configuration of single repository

    --global - configuration of user for your account ( for example user Administrator on your local machine )

    --system - … more

  • How to use Autofac in Acumatica with global graph and single registration

    Hello everybody,

    today I want to leave a short notice on how to use Autofac in Acumatica, but with single registration. In this article I've descirbed how to use Autofac for resolving interface < -- > class implementation. 

    But one of my collegues Deebhan Hari pointed that with my usage registration of classes will happen on each roundtrip and for each graph leading to potential memory leack.

    Definetely not something, we would like to have. After small conversation, we managed to add to Autofac singleton, which allowed us to have situation when only once per lifetime of the process Autofac 

    registers class only once.

    using System;

    using PX.Data;

    using Autofac;

    namespace  … more

  • How to debug Acumatica with dnSpy

    Hello everybody,

    today I want to share with you few words about debugging of Acumatica. There are plenty of wonderful posts for doing this with help of already provided PDB files of existing graphs and first of all I definetely recommend to use them.

    But there are scenarios when default pdb provided is not enough. One of recent examples when I faced it was debugging of web api rest calls. 

    Below I'll provide you with steps, which you can accomplish in order to debug error stack trace like this ( screenshot from postman ):

    how many times in your life you looked on it and said: I'd like to debug that code, but I don't have source code! What will be next steps? Open case in Acumatica, … more

  • How to work with filters applied to grid in Acumatica

    Hello everybody,

    today I want to describe how to work with Filters, that applied to grid in Acumatica page.

    For demonstration purposes I'll use Requisition form. 

    So, first of all, I want to say that dealing with Filters you'll need .View.GetExternalFilters() method.

    At requisition form graph extension you can get it like this:

    List<PXFilterRow> filters = Base.Lines.View.GetExternalFilters()?.ToList() ?? new List<PXFilterRow>();

    Demonstrated line of code will give you list of applied filters, or empty list, if no filters were applied to grid.

    Take not on how filters look like in debugger:

    honestly speaking, applied filters look very similarly to applied ODATA protocol. On my … more

  • How to create unique index in MS SQL that will allow NULL

    Hello everybody,

    today I want to leave a post about the following case: you need to index rows in your database by some unique value, which can be null. And you don't want index to include those values which are null. 

    How to achieve it? Following T-SQL can do this:

    CREATE UNIQUE INDEX idx_studentcardid_notnull ON dbo.Students(studentcardid) WHERE studentcardid IS NOT NULL;

    in this example MS SQL will create Unique index, but that index will be applied only to non null values, while null values will be ignored by WHERE condition. more

  • What is Object_id in MS SQL

    Hello everybody,

    today I want to leave a short notice on OBJECT_ID in MS SQL.

    Quite often I've seen sql like this:

    IF OBJECT_ID(N'dbo.Students', N'U') IS NOT NULL DROP TABLE dbo.Students;

    Today I have found time to discover what it actually means. 

    OBJECT_ID is function, that checks wheather object exists or not. It accepts two parameters: object name and object type. In my case object name is dbo.Students, object type U is internal representation of table.


  • How to react on clicking on Abort button in Acumatica processing screen

    Hello everybody,

    today I want to leave a notice with proposal on how to program reaction on clicking of Abort button in processing screen.

    Recently it become needed for me to program some functionality to happen after user clicks on button Abort of processing screen. 

    In my case I needed somehow to program exit from some threads which were running in parallel and I needed to finish one iteration of threads and then exit from each of those threds.

    One more point was that just terminating of threads was also a bad idea. After a while I have found IPXCustomInfo interface. With that interface you can gain control on what to do in case of user 

    clicking on Abort button. In my case I did … more

  • Excel spreadsheet commands

    F1 Displays the Office Assistant or (Help > Microsoft Excel Help)

    F2 Edits the active cell, putting the cursor at the end

    F3 Displays the (Insert > Name > Paste) dialog box

    F4 Repeats the last worksheet action (Edit > Repeat)

    F5 Displays the (Edit > GoTo) dialog box

    F6 Moves to the next pane in a workbook (if the window is split)

    F7 Displays the (Tools > Spelling) dialog box

    F8 Toggles whether to extend a selection with the arrow keys

    F9 Calculates All the worksheets in All the open workbooks

    F10 Toggles the activation of the Menu Bar

    F11 Displays the (Insert > Chart) dialog box that creates a chart (on a chart sheet) using the highlighted range

    F12 Displays the (File > Save As) … more

  • Create view if not exists in Acumatica customization

    Hello everybody,

    today I want to leave a short post on how to create some custom view in Acumatica Customization if that view doesn't exist:

    if not exists (select * from sysobjects where name='CustomerSelector' and xtype='V')


    exec (

        'CREATE view [CustomerSelector] as 

    select Distinct b.CompanyID, cc.Phone1, a.City, a.CountryID, b.TaxRegistrationID, c.CuryID, cc.Salutation, c.CustomerClassID, b.Status

    from BAccount b inner join customer c on b.BAccountID = c.BAccountID inner join [Address] a 

    on a.BAccountID = b.BAccountID inner join Contact cc on cc.BAccountID = b.BAccountID'



    This code will create view CustomerSelector only if such view doesn't exist in … more

  • How to read information from Acumatica chunk by chunk

    Hello everybody,

    today I want to leave short fragment of code, which anybody can use for processing records in Acumatica chunk by chunk. By default, everybody in Acumatica including myself uses Select method. Select works quite 

    well, but has one limitation: it reads all information that satisfies filtering conditions. But imagine that you need to read not all records, but some limited set i.e. top 5000 records.

    Next code fragment shows how to read from table CSalesOrder top 5000 records:


                        Where<CSalesOrder.CustImported, Equal<False>,

                            And<CSalesOrder.CustomerError, IsNull>>>.SelectWindowed(this, 0, 5000).

            … more

  • How to avoid echo during usage of TeamViewer

    Hello everybody,

    here I want to leave a short notice on how to avoid hearing yourself if you are connected over TeamViewer to somebodies computer. By defualt TeamViewer duplicates sound that goes through sound system of computer to which you've connected.

    Not many people know, that such functionality can be disabled. For this purpose you need to navigate to the following: 


    Computer Sound

    Remove checkbox. 

    After those steps you'll be able to avoid hearing sound of yourself via skype or other communication utility.

    For convenience I have also screenshot: