Skip to main content

Hi,

I am trying to give our users the ability to import records in the ‘documents to apply’ grid on the payments and applications screen (AR302000).

I’ve followed Sergey’s instructions here and referenced this previous post. The upload button is now visible, however I receive the following error when attempting to import a file: “The view $ImportXLSXSettings doesn't exist.” or “Error: The view $ImportCSVSettings doesn't exist.” depending on the file type.

I am not able to find any information on this error and unsure where to go from here. My current AR payment entry extension is below.

Any help is greatly appreciated!

using PX.Data;
using PX.Objects.AR;

namespace PX.KWW.KevinScreen.Graph
{
public class ARPaymentEntryExtension : PXGraphExtension<ARPaymentEntry>
{
PXOverride]
dPXViewName(Objects.AR.Messages.DocumentsToApply)]
yPXCopyPasteHiddenView]
ePXImport(typeof(ARAdjust))]
public PXSelectJoin<
ARAdjust,
LeftJoin<ARInvoice,
On<ARInvoice.docType, Equal<ARAdjust.adjdDocType>,
And<ARInvoice.refNbr, Equal<ARAdjust.adjdRefNbr>>>,
InnerJoin<Objects.AR.Standalone.ARRegisterAlias,
On<Objects.AR.Standalone.ARRegisterAlias.docType, Equal<ARAdjust.adjdDocType>,
And<Objects.AR.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>>>>>
Adjustments;
}
}

 

I found this article on stackoverflow .  In it Dhiren makes an interesting comment that 

We have used PXImportAttribute(Type) constructor where input parameter is the first (Primary) DAC that is referenced by the primary view of the graph where the current view is declared.

 

I think you should try changing the Type in our PXimport attribute statement to the Primary DAC of the graph you are extending, i.e.  ARPayment.  

Good luck

 


Thank you very much Patrick for the reply. I really thought you were on to it, but unfortunately I am getting the same error.  I also have a ticket in with Acumatica support and if we can figure this out, i will post the resolution here.


HI @jeremyhodge0 

 

I believe you have to have the IPXPrepareItems interface, you then have to enable this interface with the below:

public virtual bool PrepareImportRow(string viewName, IDictionary keys, IDictionary values)
{
if (string.Compare(viewName, "Products", true) == 0)// Copied from QuoteMaint graph you will have to change the keys and the view name
{
if (values.Contains("opportunityID"))
valuese"opportunityID"] = Quote.Current.OpportunityID;
else
values.Add("opportunityID", Quote.Current.OpportunityID);
}

return true;
}

public bool RowImporting(string viewName, object row)
{
return row == null;
}

public bool RowImported(string viewName, object row, object oldRow)
{
return oldRow == null;
}

public virtual void PrepareItems(string viewName, IEnumerable items)
{
}

Hope this helps

Aleks


Reply