Archives / 2015 / March
  • PXAccumulatorAttribute in Acumatica

    Few notes about PXAccumulatorAttribute

    If to inherit from PXAccumulatorAttribute, you'll have access to member _SingleRecord. If to set in constructor to true, you'll configure single record update mode.

    There is PrepareInsert method. This method intended for updating policy for the data fields.

    PrepareInsert is invoked within Persist method, before Acumatica framework generates SQL commands for inserted data records.

    Among paramethers of PrepareInsert method there is PXAccumulatorCollection, which has method Update. In this method it's possible to configure fields which will be updated during PrepareInsert

    Method Update has following policies: PXDataFieldAssign.AssignBehavior. … more

  • Sources of trading ideas

    Hello everybody,

    For now I read book "Quantitative Trading: How to Build Your Own Algorithmic Trading Business"

    and would like to note sources of trading ideas, which mentioned there:



    Business schools’ finance professors’ web sites

     Social Science Research Network

     National Bureau of Economic Research

    Business schools’ quantitative finance seminars financialengineering

    Mark Hulbert’s column in theNew York Times’ Sunday business section

    Buttonwood column in the Economist magazine’s finance section

     Yahoo! … more

  • How to disable callback from Checkboxes in Acumatica.

    Hello everybody.

    Today I want to share some details about inner kitchen of Checkboxes in grid of Acumatica.

    If to look inside of generated grid of Acumatica with FireFox Dom and style inspector, you can see following structure:

    Item with checkbox is implemented as td, which has div, and has another div. The first level div has data for internal ( Acumatica presentation ),

    and second div, or internal div has data for user display.

    Once I had task to disable callback from checkbox. You may wonder why somebody can have such task. The reason each tick at checkbox made 

    roundtrip to server, called number of delegates, which significantly slowed down perfomance. By the way,  CommitChanges=" … more

  • How to enable disable menu item in Acumatica

    Hello everybody,

    Today I want to share short glimps how to Enable/Disable menu item. Let's some menu. For example it looks like this:

    Suppose, we added menu action Activate in the following way:

    public PXAction<EPEmployee> Activate;


    [PXUIField(DisplayName = "Activate")]

    protected virtual IEnumerable activate(PXAdapter adapter)



    // menu action was added like this:

    public override void Initialize()




    Let's say we want to disable menu item Activate. It can be achieved with usage of RowSelected event and SetEnabled function.  In my case I used the following construction:

    protected virtual void EPEmployee_ … more

  • Make PXDefault as not required for input

    Hello everybody,

    Imagine following situation, you added to your DAC field some default value. For example like this:



    public virtual DateTime? FromDate

    And now you have default value as current date. But what, if you don't like to make it required for input. How to achieve this goal? The answer is quite simple, you just need to add PersistingCheck = PXPersistingCheck.Nothing into pxdefault attribute. Like this:


    [PXDefault(typeof(AccessInfo.businessDate), PersistingCheck = PXPersistingCheck.Nothing)]

    public virtual DateTime? FromDate

    With such changes you can init your values at form, and make it not required … more

  • Select all rows in Acumatica

    Hello everybody,

    today I want to share one simple trick. Sometime in grid you have chekcboxes, and you can have a need to make all of them selected. Here is sample of code which helps with this task:

    <px:PXGridColumn AllowCheckAll="True" AllowNull="False" DataField="Selected" TextAlign="Center" Type="CheckBox" Width="30px" /> more

  • PXFilteredProcessing in Acumatica

    Hello everybody,

    few day ago I was digging in code of CT502000, and found interesting part of code:

    public PXFilteredProcessing<ContractsList, ExpiringContractFilter> Items;

    As usually in my code I use PXFilter, and discovery of PXFilteredProcessing was confusting for me. 

    The first think that I as usually do, if I see something new, it is watching with reflector in declaration of new type. Here it what reflector shows:

    public class PXFilteredProcessing<Table, FilterTable> : PXProcessing<Table> where Table: class, IBqlTable, new() where FilterTable: class, IBqlTable, new()

    This means, that we can pass into PXFilteredProcessing two tables. T200 manual gives an answer why: Provides … more

  • Save DAC class in acumatica to DB

    Hello everybody,

    today I want to note interesting gotcha. Let's say you want to save object to db in Acumatica. You in your code created some DAC item and want to save it to db. And you call Actions.PressSave() method. And you get error. You can get suspection, that maybe you put some wrong data in your DAC class or something like this. 

    But the real reason is different, According to T200 Acumatica manual: " You should not invoke the Persist()method on the current graph instance. You can do it only for a graph instance created in a background operation."  It means that you should create instance of Graph, and in that instance call method Persist. 

    Here is fragment, which I extracted with … more

  • PXSmartPanel in Acumatica

    Hello everybody,

    today I want to write few words how to work with PXSmartPanel.

    One of my clients asked following:

    1. Press at button.

    2. Pop up should appear with two buttons ( "OK" , "Cancel")

    3. At pop up should be also selector of contracts and datetime.

    4. Existing screen should be modified.

    In order to do this, following actions were implemented:

    1. Existing screen was CT301000.

    2. If to look in screen source code, following line says about graph:

    <px:PXDataSource ID="ds" runat="server" Visible="True" Width="100%" TypeName="PX.Objects.CT.ContractMaint"

    PrimaryView="Contracts" BorderStyle="NotSet">

    3. It means, that we need to create extension class for  … more

  • Principal Component Analysis in Machine Learning

    Hello everybody,

    today I want to note important for me details of Machine Learning. 

    So, the first and very important usage of PCA is visualizing data. If you have 10 dimensions, can you visualize those data? If you can I'm happy about you, but I can't. I can imagine only 1, 2, 3 D :). But with principal componenet analysis it's possible to visualize data. 

    Second application is reducing memory/disk need to store data. That's quite self-explanatory, to train on 10 000 dimensions and 100 dimensions is different.

    Third is speeding up learning algorithm. It's actually related with second.

    Another important detail, it's bad idea to use PCA in order to avoid overfitting. Actually everybody … more

  • How to override base event in Acumatica

    Hello everybody,

    Imagine following scenario. You have some code in base class, which you need to change. How to do it. For this purpose you can use PXOverride attribute.

    See the following code:

    public class YourExtension : PXGraphExtension<SomeBasicGraph>



    public void MethodForOverriding(string viewName, IEnumerable items)


      // Method body



    In case which is presented MethodForOverriding of base class will be called. If you want to avoid it, you can add additional argument to the code,

    and then manipulate how to call it or even omit calling of method from base logic. Look at the following code:

    [Update, thanks to Taras Vynar]

    public class … more

  • Event handlers in Acumatica

    Hello everybody,

    today I want to share with you how order of event handlers in Acumatica is organized.

    Each graph has list of event handlers for each type of manipultaion. Also new declarations of methods can be added to the start or then end of collection, and there are events which are added in the beginning of collection.

    According to T300 event handlers which are added to the end of collection:

        • FieldUpdated(PXCache sender, PXFieldUpdatedEventArgs e)

        • RowSelecting(PXCache sender, PXRowSelectingEventArgs e)

        • RowSelected(PXCache sender, PXRowSelectedEventArgs e)

        • RowInserted(PXCache sender, PXRowInsertedEventArgs e)

        • RowUpdated(PXCache sender, … more

  • Usage of base views in Acumatica

    Hello everybody.

    Today I want to write interesting detail, which was strange for me. 

    Imagine situation, that you in Extention class want to change some behaviour and want to ask something from view in base graph. You can try to do it with Base.BaseViewName.Cache.Current. And according to my observations it works. But as mentioned in T300 manual To query a data view declared within the base BLC or lower-level extension from the data view delegate, you should redeclare the data view within the BLC extension.

    If you want to ask why this copy/paste needed I honestly will tell you: I don't know :) more

  • Extentsion table in Acumatica with IsOptional

    Hello everybody,

    today I want to notice few words about attribute IsOptional. DAC extension can be mapped by inner join, or by left join statement. 

    [PXTable(IsOptional = value)] // default is false, or Inner join

    public class DACTableExtension : PXCacheExtension<BaseDACTable>




    As far as I understand idea behind name, IsOptional means are there additional items from left join. And if set to true, means yes, there are, and if set to false ( default way ) there are not.

    The left join way ( IsOptional = true ) can be used for

    not synched tables

    creates extension record when record in base table created or updated

    calculates default field values if no extension table … more

  • DeletedDatabaseRecord in Acumatica

    Hello everybody,

    today I want to share notice about DeletedDatabaseRecord database field. Sometime in db you can notice DeletedDatabaseRecord field. For example there is DAC Sub. You can even wonder what is this if it is not visible for users? It is purposed Acumatica for monitoring is record deleted, and presented. 

    Another area of usage DeletedDatabaseRecord is extension tables. If you want to use extension table, and basic table has DeletedDatabaseRecord, then you should add it to extension table as well. more

  • Auto discovery mechanism of Acumatica Extensibility Framework

    Hello everybody,

    another interesting notice today. 

    Imagine following situation.

    1. You have base class. Let it is called GraphX. 

    2. In your library you created extentions of this grap: GraphXExt1, GraphXExt2 at the same level. For example like this:

    public class GraphXExt1 : PXGraphExtension<GraphX>


    protected virtual void ARTran_USRProjectID_FieldDefaulting(PXCache sender, PXFieldDefaultingEventArgs e)




    public class GraphXExt2 : PXGraphExtension<GraphX>


    protected virtual void ARTran_USRProjectID_FieldDefaulting(PXCache sender, PXFieldDefaultingEventArgs e)




    3. Then question, if page will be loaded, which ARTran_ … more

  • What is companyid in Acumatica

    Hello everybody,

    today I want to notice few words about companyid field. What is it's purpose. Initially Acumatica provides two !!!! companyid. 1 and 2. Why two? The first is for some Acumatica internal usage, and then your company will get id 2. Even if you believe that your company deserve to be 1, you'll get 2 or more. It means that first active company will have id 2 or bigger. So, if you have some DAC which should be used by few companies, then you just add companyid field, make it as key, and that's it, Acumatica will track to which company your entity should belong. more

  • Debugging learning algorithm

    Few notes of how to debug machine learning algorithm:

    Get more training examples

    Try smaller sets of features

    Try getting additional features

    Try adding polinomial features

    Try increasing lambda

    Try decreasing lambda

    What those trys can achieve:

    fixes high variance

    fixes high variance

    fixes high bias

    fixes high bias

    fixes high bias

    fixes high variance


  • Grid toolbar buttons in Acumatica

    Hello everybody,

    have you ever wondered, that SkinID property may regulate grid toolbar set of buttons? For me it was unknown untill today. Here it is list of id's and buttons according to T200:

    Primary: Adds the Add, Delete, Fit to Screen, and Exportbuttons to the toolbar. This value is typically used for a grid on a simple edit page that consists of the single grid.

    Details or DetailsInTab: Adds the Refresh, Add, Delete, Fit to Screen, and Export buttons to the toolbar. This value is typically used for a grid that displays the detail data on a master-detail page

    Inquire: Adds the Refresh, Fit to Screen, and Export buttons to the toolbar. This value is typically used for grids on … more

  • Why ColumnWidth can be ignored or another gotcha

    I discovered recently another gotcha in Acumatica.

    The ColumnWidthproperty value is never applied to the UI controls if the Merge property is set to True for the same PSLayoutRule component. more