Archives

Archives / 2017 / November
  • How to hide tab in Acumatica

    Hello everybody,

    today I want to share piece of knowledge about Acumatica controls. Recently I was asked to add one more tab to page Checks and payments.

    Let's suppose it was named Allocations. It should be displayed only if type of payment is set to Prepayment.

    Such kind of behaviour is possible to implement via three steps:

    Add tab with name Allocations

    Set VisibleExp to the following: 

    VisibleExp="DataControls["edDocType"].Value==PPM"

    Set BindingContext to the form like this:

    BindingContext="form"

    Or just more detailed picture:

    </px:PXTabItem>

    <px:PXTabItem Text="PO Allocations" VisibleExp="DataControls[&quot;edDocType&quot;].Value==PPM" BindingContext=" … more

  • 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