Maintenance Pages In Acumatica


Hello everybody.

Here goes some my notes of Maintenance pages. 

First convention is that maintenance pages has number start of 20. For example pr203000.aspx means that it is maintenance page for pr, and I make this conclusion on basis that numbers start from 20.

As usually they are placed under manage group at sitemap and used for input of helper data, not the main.

No Comments


Add a Comment


Make Grid To Have All Screen


Hello everybody,

today I want to share how to make grid item to feet all container. For this purpose you just can use property AutoSize. It makes grid to feet entire area of parent container

No Comments


Add a Comment


Create Graph Instance


Hello everybody,

today I want to notice how to create graph. There are two ways:



If you want to get extention class, from base class, you can use following function:


No Comments

Add a Comment


Fix At Least One Column In The Selected Area And Controlling Set Of Selected Columns In Acumatica


Hello everybody,

today  I want to share tricks related to Acumatica grids:

1.       How to fix at least one column in the Selected area so users will not be able to move it to the Available? All our custom pages have grids which can be moved.

------ You need to utilize PXGridColumn’s  AllowShowHide property set to False for not allowing user to hide for at least key column/s.

2.       How to control the default set of Selected columns for the grid so only the particular columns will be shown in the grid by default, and the rest of columns can be added by the user if necessary?

------- Grid Columns created for DAC fields marked not visible will be shown as Available column

Practical value of such fixing is that user can remove all columns, and if he does so, then grid disappear, and you'll need to dig in db in order to resurect grid on page. 

No Comments

Add a Comment


Debug Executeselect In Extentsion Graph Of Acumatica


Hello everybody,

today I want to share how to debug method ExecuteSelect from Base in extension class:

public delegate IEnumerable exSelectDelegate(string viewName, 
object[] parameters,

object[] searches, string[] sortcolumns, bool[] descendings,
PXFilterRow[] filters, ref int startRow, int maximumRows, ref int totalRows); [PXOverride] public IEnumerable ExecuteSelect(string viewName, object[] parameters,
object[] searches, string[]
sortcolumns, bool[] descendings,
PXFilterRow[] filters, ref int startRow, int maximumRows, ref int totalRows,
exSelectDelegate f ) { IEnumerable result = null; try { result = f(viewName, parameters, searches, sortcolumns, descendings, filters, ref startRow, maximumRows, ref totalRows); } catch (Exception ex) { // analyze exception in some way } return result; }

No Comments


Add a Comment


How To Deal With Cases When Decimal Is Not Enough


Hello everybody,

today I want to drop a note about cases when you need high precision, and C# type decimal is not enough for your needs.

I discovered for myself GNU MP library, which has also wrapper in C#. 

Amongh feautures which this library proposes are the following:

1. High number precision, which is limited only by available memory.

2. Rish set of operators

No Comments


Add a Comment


Neural Networks Teaching


Hello everybody,

today I watched vidoe of Dr. James McCaffrey about traing neural netwoks. 

So, few interesting details, which was useful for me. 

1. As usually it is more then enough one hidden layer. 

2. Imagine, that you need to feed into your neural network some data. Let's say Age, income, sex, religion. For data normalization it is good to use not big numbers.

For example for Income which is around 51000 it's good to give to network 5.1 and not 51000.

For sex passing into NN it's good to use gues what? If you have an idea 0 and one, you are wrong. It's good to pass -1 and 1.

And for classfication like if you have input for example 3 different categories, the best way to pass not values like 1, 2, 3, but to pass three inputs, and pass at them 100, 010 or 001. For example if you need to code Christian, Muslim, Buddhist, you'll pass 100 for Christian, 010 for Muslim, 001 for Buddhist.

3. Four most common activation functions:

  a. logistic sigmoid

  b. hyperbolic tangent

  c. Heaviside step

  d. Softmax

4. Training algorithms for neural networks:

  a. back-propogation

  b. genetic algorithm

  c. particle swarm optimization

No Comments


Add a Comment


Rowdefaulting And Copy Paste In Acumatica Or Copy Paste Mode In Acumatica


Hello everybody,

recently I had the following situation. 

According to business logic, I created RowDefaulting. And it worked great. Then business analyst decided to check copy/paste functionality of Acumatica, and you know what? He discovered that copy/paste is broken. After investigation I discovered that it was due to RowDefaulting event.  For me it meant the following, I need to turn off RowDefaulting after copy/paste. 

After usage of reflector, I noticed interesting property  IsCopyPasteContext in the graph. 

So I modified function RowDefaulting.

private void RowDefaulting(PXGraph graph)


      if( !graph.IsCopyPasteContext )


                    //do some row defaulting logic.




Hope you enjoyed this tip


Custom Selector In Acumatica


Greetings to everybody,

today I want to document how to make selector in Acumatica. 

I had the following use case:

1. Acumatica dropdown, which can have three values ( for example a, b, c) .
1.1 In case if user select option a, I need to show in PXSelector values from Table A with some filtering condition.
1.2 In case if user select option b, I need to show in PXSelector values from Table  B with another filtering condition
1.3 In case if user select option c, I need to show in PXSelector value from Table C with another filtering condition

Due to the fact, that PXSelector can work only with one DAC, the only way to solve it was implementing custom selector which inherits from PXCustomSelectorAttribute class.

In order to do this, I made the following code:

public class SelectorCustomerContractAttribute : PXCustomSelectorAttribute
        private Type selectorField;
        private Type contractFld;

        public SelectorCustomerContractAttribute(Type selectorField, Type contractField)
            : base(typeof(DRDocumentRecord.refNbr))
            if (selectorField == null)
                throw new ArgumentNullException("selectorField");

            if (contractField == null)
                throw new ArgumentNullException("contractField");

            if (BqlCommand.GetItemType(selectorField).Name != BqlCommand.GetItemType(selectorField).Name)
                throw new ArgumentException(string.Format("moduleField and docTypeField must be of the same declaring type. {0} vs {1}",
                    BqlCommand.GetItemType(selectorField).Name, BqlCommand.GetItemType(selectorField).Name));

            this.selectorField = selectorField;
            contractFld = contractField;

        public override void FieldVerifying(PXCache sender, PXFieldVerifyingEventArgs e)

        protected virtual IEnumerable GetRecords()
            var cache = this._Graph.Caches[BqlCommand.GetItemType(selectorField)];
            var cbs = (ContractBillingSchedule) cache.Current;
            cache = this._Graph.Caches[BqlCommand.GetItemType(contractFld)];
            var contract = (Contract) cache.Current;
            var result = new List<int>();

            if (cbs.BillTo == "M")

            if (cbs.BillTo == "P")
            if (cbs.BillTo == "S")
            return result;

NB. List is not feeting for result, but if you change it to something else, you can easily to achieve what you want. 

Usage of the selector can be like this:

public class ContractBillingScheduleExt : PXCacheExtension<ContractBillingSchedule>
        #region UsrCustomerContact
        public abstract class usrCustomerContact : IBqlField, IBqlOperand
        [SelectorCustomerContract(typeof(ContractBillingSchedule.billTo), typeof(Contract.contractID))]
        [PXUIField(DisplayName = "Customer Contact", Visibility = PXUIVisibility.SelectorVisible)]
        public virtual int? UsrCustomerContact { get; set; }

enjoy if you need

Acumatica Cache Inserted Updated Objects


Hello everybody,

today I want to share one simple technic of how to filter inserted items in cache from other objects. I discovered it with reflector, while diffing in code of APInvoiceEntry. 

Here it is: 

Adjustments.Cache.Inserted - this item will give you which items were inserted in view Adjustments. 

Another interesting details was updated:


will give you updated items in cache.

And of course deleted: 


No Comments


Add a Comment