Hi,
I tried to do some customization in my acumatica Erp (2022 R2).
When I add the Base.Document.Current method it shows an error below like that.
Is it not valid? Please help me.
Thanks you
Best answer by VidhyaHari
View originalHi,
I tried to do some customization in my acumatica Erp (2022 R2).
When I add the Base.Document.Current method it shows an error below like that.
Is it not valid? Please help me.
Thanks you
Best answer by VidhyaHari
View originalHi
Can you please share the ProformaEntry extended graph code here?.
using PX.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using PX.Data.BQL.Fluent;
using PX.Objects.AR;
using PX.Objects.CR;
using PX.Objects.PO;
using System.Collections;
using PX.Objects.Common.GraphExtensions.Abstract.DAC;
using PX.Objects.SO.GraphExtensions.CarrierRates;
using PX.Objects.CR.Extensions.CRCreateSalesOrder;
using PX.Objects.CR.Extensions.Relational;
namespace GRIProformaInvoice.Extension
{
public class APProformaEntry_Extension : PXGraphExtension<APProformaEntry>
{
public SelectFrom<POOrder>.View POrdersView;
//public SelectFrom<POOrderExtension>.View POrdersView;
//public PXFilter<POOrderExtension> POrdersView;
public SelectFrom<APProformaItemList>.View APProformaView;
public PXAction<APProforma> MyAction;
[PXUIField(DisplayName = "Add Purchase", MapEnableRights = PXCacheRights.Select, MapViewRights = PXCacheRights.Select)]
[PXButton(CommitChanges = true)]
public virtual IEnumerable myAction(PXAdapter adapter)
{
if (POrdersView.AskExt() == WebDialogResult.OK)
{
APProforma proforma = Base.Document.Current;
proforma.LocationID = "Matara";
Base.Document.Update(proforma);
Base.Save.Press();
}
return adapter.Get();
}
}
}
Hi, @jeewanishalika20,
I believe you need to declare view as Document like below example.
public PXSelectJoin<SOOrder, LeftJoinSingleTable<Customer, On<Customer.bAccountID, Equal<SOOrder.customerID>>>, Where<SOOrder.orderType, Equal<Optional<SOOrder.orderType>>, And<Where<Customer.bAccountID, IsNull, Or<Match<Customer, Current<AccessInfo.userName>>>>>>> Document;
I hope, It will work.
Regards,
Greytrix
Which page you customize? I can’t find graph APProformaEntry for some strange reason.
It’s not existing page. I develop new screen and graph.
Hi
It should not be a graph extension.
public class APProformaEntry : PXGraph<APProformaEntry>
{
// Declare your own View and add logic
}
This is not existing standard one.
I developed a new page.
Hi
This is my newly developed form.In this form when I clicked the ADD PURCHASE button i nedd to open smart panel to load purchase order details below like that.
For the smart panel,I created a graph extension for the APProformaEntry graph(APProformaEntry graph is my main graph).
Then,I need to add purchase order details into my View details grid when click the ADD & CLOSE button.
That’s why I use the graph extension.
Thanks you
Base.Document is a reference to the Document view of your base graph. It does look like you don’t have the Document view in your APProformaEntry graph. Could you please double check that?
Hi
How I check the document view in my base graph.
Thanks you
Hi
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.