Blog

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

  • Getting Combo-box values set for REST API

    Hello everybody,

    today I want to share idea on how to get getting Combo-box values set for REST API.

    As usually values of comboboxes values are just hardcoded in web api calls, but sometimes it may be necessary to load them from Rest API, for example for cases if you want to target multiplve versions of Acumatica. For such a purpose I'd suggest to create Graph, which via reflection will read values from dlls. Quite similar to what Acumatica team does. 

    Below goes source code of graph, which via reflection loads data:

    using PX.Data;

    using System;

    using System.Collections;

    using System.Reflection;

    namespace LA

    {

        public class ListAttributesInq : PXGraph<ListAttributesInq>

         … more

  • Create payment proc

    Hello everybody,

    today I want to write a few words about method CreatePaymentProc in graph SOOrderEntry.

    Among different features of this method, want to describe that it have for some reason out parameter! Take a look on it's declaration:

    public virtual void CreatePaymentProc(SOOrder order, out PXGraph target, string paymentType = ARPaymentType.Payment)

    {

    as you see, it accepts as a parameter PXGraph. Inside of open part of Acumatica source code there is only one more file, which has similar staff: ServiceOrderCore. Take a look on it:

    public static void CreatePrepayment(FSServiceOrder fsServiceOrderRow, FSAppointment fsAppointmentRow, out PXGraph target, string paymentType =  … more

  • Acumatica Application Architecuture

    Hello everybody,

    today I want to leave a short note about Acumatica Architecture. Take a look on this picture:

    As you can see from the schema business logic controllers is kind of single source of truth. Acumatica doesn't have dependencies between UI and Web services. Also it means, if you hide something from UI on the page, it will be also hidden from Mobile app.

    But want to say about few exceptions as well.

    Suppose following scenario. You make a graph, and you know for sure, that from UI standpoint, it's logicall to load some visualization data, but from API call there is no reason to call some piece of code. How to inform Acumatica about it?

    For this purpose you can use … more

  • Acumatica summit 2020

    Hello everybody,

    today I want to write a few words or kind of summary of Acumatica summit 2020. 

    First of all want to say that for me it was very interesting to see people which have big or even huge desire to make Acumatica grow. 

    And also want to post some photos. 

    Hackathon

    When I thought about Hackathon, I didn't thought that I'll be part of a winning team. I thought that I will have some fun. Make some customization for Acumatica, congratulate the winner and will go home. But to my surprise, here is what I've got:

    well, not only myself, but other teammates with me in team Theta. Harsha, Dhiren, Yuriy and Spencer. Guys, it was a huge pleasure to play with you on the one team! … more

  • How to display Green image status

    Hello everybody,

    I want to leave a short note regarding showing successful validation of some operation. Background is the following. Imagine, that you need somehow validate value entered in some checkbox. And in case if validation is successful, you'd like to show green sign near your text entry. I mean something like this:

    How to achieve it?

    1. Create field in DAC or DAC extension similar to shown below:

    public abstract class creditGreenStatus : BqlBool.Field<creditGreenStatus> { }

    [PXUIField(DisplayName = "", Visible = false)]

    [PXBool]

    [PXDefault(false, PersistingCheck = PXPersistingCheck.Nothing)]

    public bool? CreditGreenStatus { get; set; }

    2. Create markup on the page like … more

  • Generic template methods in Acumatica

    Hello everybody,

    today I want to write a few words about Generic template methods in Acumatica. 

    In Acumatica there is such a greate feature as convention over configuration. For example if you want to add reaction in Acumatica on changing the field Description of SOOrder you may do something like this:

    protected void SOOrder_OrderDesc_FieldUpdated(PXCache cache, PXFieldUpdatedEventArgs e)

    {

    }

    and also it's relatively convenient, but inside of that method you'll need to make some casting operations. For quite a long time Acumatica allows to have new format with usage of underscore:

    protected void _(Events.FieldUpdated<SOOrder, SOOrder.orderDesc> e)

    {

        

    }

    And take a note of … more

  • How to assign random values to each row in SQL for Acumatica

    Hello everybody,

    recently during testing of some logic for me it was necessary to assign some random values to table VendorPart in Acumatica. In order to achieve it, I've created such a script:

    update VendorPart set NetPrice = (ABS(CHECKSUM(NEWID()))% 3000.25 + 1.1 + 1), ListPrice= (ABS(CHECKSUM(NEWID()))% 3000.25 + 1.1 + 1)

    where NetPrice = 0 and ListPrice = 0

    of course such a query will not satisfy all requirements for random numbers generator, but in scope of my business scenario it was better then assign the same value to both columns.

    Summary

    If you want to have some diversity in digits for your values, use NEWID function for assigning values. more

  • Import data in Acumatica

    To import data (Customers for instance) from .xlsx format we need to make 3 actions:           

    Create Data Provider

    Create an Import Scenario

    Make an Import by Scenario

    1: First of all, before we will start do all those steps, we need to have .xlsx file with customers and such fields at least on the first row as a heading row:

    After that when we’ve checked Customers.xlsx file, click on the menu button and choose Integration tab.

       

    Afterwards on the Profiles subheading click Data Providers

    In the *Name field type the name of the future Data Provider to/from Excel format (Import/Export Customers to Excel) and in the next field  - * Provider Type: choose … more

  • Export data from Acumatica

    Hello everybody,

    I want to describe how to export data from Acumatica. 

    To export data (Customers for instance) to .xlsx format output we need to make 3 actions:

    Create a Data Provider

    Create an Export Scenario

    Make an Export by Scenario

    1. First of all, before we will start do all those steps, we need to create .xlsx file with such fields at least on the first row as a heading row:

    After that when we’ve created Customers.xlsx file, click on the menu button and choose Integration tab.

    Afterwards on the Profiles subheading click Data Providers:

    In the *Name field type the name of the future Data Provider to Excel format (Import/Export Customers to Excel) and in … more

  • Acumatica Sequence of Events

    Hello everybody,

    today I want to leave a picture, which shows sequence of events in Acumatica depending from happening scenario. 

    Sometime I'm getting questions from people like this: why after update of record I don't have my FieldDefaulting executed?

    Or why deletion of record doesn't trigger my RowUpdated event?

    Or why Save doesn't initiate RowInserting event and so on. 

    If you take a look on the picture you'll be able to notice that those questions easily addressed. 

    That picture shows that during update, you have executed FieldUpdating, FieldVerifying and FieldUpdated executed. But you will not get FieldDefaulting executed, 

    because it was executed before in Insert event. 

    Below … 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 Solutions Architect in company Kensium.