Wednesday, March 13, 2013

Adding Missing Columns to the grid Upload Data Import Function.

Hi Everyone,

We can upload data directly from Excel into Acumatica screens, as long as screen detail area (or grid) has Action Button "Upload". Like, for example, Journal Entry screen from GL module.


But not all the fields will be presented in the Screen Fields choice:


Like above, Transaction Date, that is present in the screen is missing in the Property Name choice.

In order to add it, a slight customization will be needed. This field is hidden on the form by the Business Logic code. And we have to re-enable it.

Adding the following code to Batch_RowSelected event will help to make the column visible.
Under normal circumstances you need to add an event in your Customization Manager if have not yet made so:

protected override void Batch_RowSelected(PXCache sender, PXRowSelectedEventArgs e)
{
  base.Batch_RowSelected(sender, e);
  var row = (Batch)e.Row;

  PXUIFieldAttribute.SetVisible<GLTran.tranDate>(GLTranModuleBatNbr.Cache, null, true);
    
}
Here you can see that we made Transaction Date visible by changing it's property to True.

All the best,

Sergey.

No comments:

Post a Comment