Blog

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

  • 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

  • How to refresh cache of Acumatica

    Hello everybody,

    today I want to leave a comment on how to refresh cache of Acumaitca.

    As usually I start with this method:

    ViewName.View.RequestRefresh();

    But I found that it not always work. For my surprise RequestRefresh not works for some reasons. I think reason for this may be that Acumatica has two caches: caching of data and caching of queries.  

    If that is the case, I use another approach ( more hardcore ) 

    ViewName.View.Cache.Clear(); // clearing cached data

    ViewName.View.Cache.ClearQueryCache(); // clearing cached queries.

    Second approach works a bit better, because it clears not only data, but also clears cached queries, and as outcome clearing results more

  • How to display images in grid of Acumatica

    Hello everybody,

    today I want to leave a short post on how to display images in grid of Acumatica. 

    I'll demonstrate it on sample of Sales Orders pages, which is known as SO301000.

    End result will look like this:

    In order to make it work, I've done the following:

    Created extension to SOOrderEntry and added there some kind of reading of url images

    Created DAC class for demo purposes

    Added few controls and css/js on customized so301000 page.

    Now a bit more details. For SOOrderEntry I've created following extension:

        public class SOOrderEntryExt : PXGraphExtension<SOOrderEntry>

        {

        public PXSelect<SOImageItem> Images;

        protected virtual IEnumerable images() … more

  • 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

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: zaljur1989(at)gmail.com

Job information

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