Solved

Add Import from Excel Button 21R1

  • 31 January 2022
  • 12 replies
  • 528 views

Userlevel 5
Badge

I’d like to add an import from Excel button to the Payments and Applications grid on screen: AR302000

I can see some stuff online, but it’s ancient. For 2021 R1, how do you add that feature to a screen? I’m barely competent with things like PXSelect<>, so brace yourself for crazy questions :D

 

Thanks,

icon

Best answer by Django 31 January 2022, 21:32

View original

12 replies

Userlevel 7
Badge +5

Will an Import Scenario work or do you need to have the import functionality on that screen?

Userlevel 5
Badge

Import from Excel button is needed. I’m not going to unlock mass imports for my users, they’d be so lost.

Userlevel 4
Badge +1

hi @Michael Hansen 

Can you review this  and let us know if you still face any challenge. 

Enabling Upload from Excel for the Grid - Acumatica Developers Blog

Userlevel 7
Badge +5

What are you importing?  Just the summary area information or do you need to import application details as well?

Userlevel 5
Badge

Before I move ahead on this, those instructions are from 2016, are they still valid for a 2021 build? A lot has changed under the hood in the past half a decade. I don’t want to break anything :)

 

Also first step has me stuck sadly:

public class CSCalendarMaint : PXGraph<CSCalendarMaint, CSCalendar>

{

...

[PXImport]

public PXSelect<CSCalendarExceptions> CSCalendarExceptions;

...

}

 

What would be the hooks for the Payments Screen? Just ARAdjust? ARAdjustMaint? ARAdjustExceptions?

Userlevel 5
Badge

@ddunn - Importing to the Documents to Apply grid. So lines, lots and lots of lines. The summary data is hand-keyed easily enough.

Userlevel 4
Badge +1

hi @Michael Hansen 

Below is an outline idea that comes on my mind, where  we can copy/ paste  the “Adjustment”  view and  create a one more view name in the extension and use this view for  importing.

 public class ARPaymentEntryExtension : PXGraphExtension<ARPaymentEntry>
 {
       [PXImport(typeof(ARAdjust))]
            public PXSelectJoin<ARAdjust,
            LeftJoin<ARInvoice, On<ARInvoice.docType, Equal<ARAdjust.adjdDocType>,
                And<ARInvoice.refNbr, Equal<ARAdjust.adjdRefNbr>>>,
            InnerJoin<Standalone.ARRegisterAlias,
                On<Standalone.ARRegisterAlias.docType, Equal<ARAdjust.adjdDocType>,
                And<Standalone.ARRegisterAlias.refNbr, Equal<ARAdjust.adjdRefNbr>>>,
            LeftJoin<ARTran, On<ARInvoice.paymentsByLinesAllowed, Equal<True>,
                And<ARTran.tranType, Equal<ARAdjust.adjdDocType>,
                And<ARTran.refNbr, Equal<ARAdjust.adjdRefNbr>,
                And<ARTran.lineNbr, Equal<ARAdjust.adjdLineNbr>>>>>>>>,
            Where<ARAdjust.adjgDocType, Equal<Current<ARPayment.docType>>,
                And<ARAdjust.adjgRefNbr, Equal<Current<ARPayment.refNbr>>,
                And<ARAdjust.released, NotEqual<True>>>>> Adjustmentsimport
        
 } 

Userlevel 5
Badge

That looks nothing like the instructions you linked and is pretty daunting to add in. Is there nothing online for this that is current? Seems like a basic addition, but everything I’m seeing is semi-complex. I’m amazed we don’t have this by default for every grid. If no one has a clear and concise answer I can pay my VARs, but I was hoping to learn this one myself. This is not the only grid where I’d like to add the Import from Excel button. 

Userlevel 7
Badge +5

At a minimum the data view has to have the [PXImport] attribute before you can modify the form to allow the grid to update. Enabling that is the trick and Deebhan’s post gives you the tricky part. But you have to feel comfortable with creating the graph extension.

I’d also recommend adding a suggestion for adding the [PXImport] attribute on this grid view and any others that you’d like to see enabled.

Userlevel 7
Badge +11

Hi @ddunn 

I don't think [PXImport] will work for all screens. I tried for the payment and application screen. It's not working.  

Userlevel 5
Badge

Id just like to add that the Journal Transactions entry screen (GL301000) already has the import functionality in its grid…. I have not looked at the graph but its possible that looking into this will help you understand how to implement the same on payments and applications entry

Badge +11

I found this thread trying to enable this for Payments and Applications as well.

I have a very strange situation. I was attempting to enable this for a client, and in their site, the package I have written does not work. The long operation completes successfully, almost immediately, but no data is added, despite there being unpaid invoices to apply.

I published this into a demo data instance of EXACTLY the same version of Acumatica, and it works flawlessly.

I’m really confused what could be causing the difference.

 

The only thing I can figure out is that there are different features enabled between the instances. However, the demo instance (where it’s working) has way more features turned on, which should only serve to make that the more complicated, more unreliable situation.

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved