Skip to main content
Solved

Add Import from Excel Button 21R1


Michaelh
Semi-Pro III
Forum|alt.badge.img+2

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,

Best answer by Django

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.

View original
Did this topic help you find an answer to your question?

12 replies

Forum|alt.badge.img+6
  • Captain II
  • 556 replies
  • January 31, 2022

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


Michaelh
Semi-Pro III
Forum|alt.badge.img+2
  • Author
  • Semi-Pro III
  • 187 replies
  • January 31, 2022

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


deebhane
Semi-Pro I
Forum|alt.badge.img+1
  • Semi-Pro I
  • 62 replies
  • January 31, 2022

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


Forum|alt.badge.img+6
  • Captain II
  • 556 replies
  • January 31, 2022

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


Michaelh
Semi-Pro III
Forum|alt.badge.img+2
  • Author
  • Semi-Pro III
  • 187 replies
  • January 31, 2022

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?


Michaelh
Semi-Pro III
Forum|alt.badge.img+2
  • Author
  • Semi-Pro III
  • 187 replies
  • January 31, 2022

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


deebhane
Semi-Pro I
Forum|alt.badge.img+1
  • Semi-Pro I
  • 62 replies
  • January 31, 2022

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
        
 } 


Michaelh
Semi-Pro III
Forum|alt.badge.img+2
  • Author
  • Semi-Pro III
  • 187 replies
  • January 31, 2022

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. 


Forum|alt.badge.img+6
  • Captain II
  • 556 replies
  • Answer
  • January 31, 2022

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.


jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • 701 replies
  • February 2, 2022

Hi @ddunn 

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


xkylewrightx
Semi-Pro I
Forum|alt.badge.img
  • Semi-Pro I
  • 77 replies
  • February 3, 2022

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


darylbowman
Captain II
Forum|alt.badge.img+13

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings