By using this website, you agree to our Terms of Use (click here)
Hi,
I have added the upload button to "Payments and Applications" screen through a simple customization. As seen here,
http://asiablog.acumatica.com/2016/12/enabling-upload-from-excel-for-grid.html
However, I receive an error when I try to upload a file. I know it is because the code is not functional yet, and that is the problem.
I have changed the code as below, but not sure how this line, " CSCalendarExceptions;" should be altered. By the way, we are on version 6.10.0133.
Thank you.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using PX.Common;
using PX.Data;
using PX.Data.Api.Export;
using PX.Objects.CA;
using PX.Objects.CM;
using PX.Objects.CR;
using PX.Objects.CS;
using PX.Objects.GL;
using SOAdjust = PX.Objects.SO.SOAdjust;
using SOOrder = PX.Objects.SO.SOOrder;
using SOOrderEntry = PX.Objects.SO.SOOrderEntry;
using SOOrderType = PX.Objects.SO.SOOrderType;
using PX.Objects.AR.CCPaymentProcessing;
using PX.Objects.Common;
using PX.Objects.AR.Standalone;
using PX.Objects;
using PX.Objects.AR;
namespace PX.Objects.AR
{
public class ARPaymentEntry_Extension:PXGraphExtension<ARPaymentEntry>
{
#--------------------------------------------------------------------
# Below lines added -------------
[PXImport]
public PXSelect CSCalendarExceptions;
#--------------------------------------------------------------------
So he's not altering an AR screen, he's altering a Work Calendar screen, specifically, his work calendar's exceptions tab. The class for data in that area he wants a to import in to is: CSCalendarExceptions. So you need to replace the instances of "CSCalendarExceptions" with the table name you're trying to import into, which I believe is: "ARAdjust". Use CTRL+ALT+LEFT_CLICK to see your data class for any given field (even if the fields are empty).
I believe your public declaration should then be:
public PXSelect<ARAdjust> ARAdjust;
However, I'm not 100% certain your header is correctly defined. Every time I've hit an extension table it's been to access my custom fields, not stock fields. I would not think you'd need the "_Extension" portion, but my knowledge is super limited here. If you have C# specific issues, I would also consider dual-posting in Stack Overflow.
Thank you Michael. I have tried a few different things but none has worked so far. I am pretty sure it is not very complicated but I am missing something because I am new to this.
Maybe I need to add a few more lines like here
https://stackoverflow.com/questions/39643815/add-excel-upload-control-to-grid-toolbar
I have also checked the code for the pages like SO screen, which comes with the Upload function, but could not see the [PXImport] anywhere.
Below is the last thing I tried so far.
[PXImport(typeof(ARPayment))]
public PXSelect<ARAdjust> ARAdjust;
Sorry @taylan, I'm not a C# guy so I can't really help here, although @michael-hansen might be onto something. You might also try posting your question in StackOverflow. There are a few Acumatica developers who monitor that area and respond.
Here is the link:
https://stackoverflow.com/questions/tagged/acumatica