Solved

CustomizationPlugin

  • 19 April 2024
  • 1 reply
  • 9 views

Hi,

I am trying to create a customizationplugin in which I want to setup a Vendor. While adding the inserting the data into the vendor table, i see below issue.

 


                    

                    VendorMaint vendorMaint = PXGraph.CreateInstance<VendorMaint>();

                    vendor = vendorMaint.CurrentVendor.Insert();

                    vendor.AcctCD = "TEST";

                    vendor.AcctName = "TEST";

                    vendor.Status = "Active";

                    VendorClassMaint vendorClassMaint = PXGraph.CreateInstance<VendorClassMaint>();

                    VendorClass vendorClass = PXSelect<VendorClass, Where<VendorClass.vendorClassID, Equal<Required<VendorClass.vendorClassID>>>>.Select(vendorClassMaint, "GNA");

                    vendor.VendorClassID = vendorClass.VendorClassID;

                    vendor.TaxAgency = true;

                   

                    vendorMaint.Save.Press();

 

I see below - message in the exception.

Please confirm if you want to update current Vendor settings with the Vendor Class defaults. Original settings will be preserved otherwise.

And the stack trace below -

at PX.Data.DialogManager.AskInternal(String viewName, PXGraph graph, String key, Object row, String header, String message, MessageButtons buttons, MessageIcon icon, Boolean repaintControls, InitializePanel initializeHandler, List`1 commitFields, IReadOnlyDictionary`2 customButtonNames)   at PX.Data.DialogManager.Ask(PXView view, String key, Object row, String header, String message, MessageButtons buttons, IReadOnlyDictionary`2 buttonNames, MessageIcon icon, Boolean repaintControls)   at PX.Data.PXSelectBase`1.Ask(String header, String message, MessageButtons buttons, Boolean refreshRequired)   at PX.Objects.AP.VendorMaint.Vendor_VendorClassID_FieldVerifying(PXCache cache, PXFieldVerifyingEventArgs e)   at PX.Data.PXFieldVerifying.Invoke(PXCache sender, PXFieldVerifyingEventArgs args)   at PX.Data.PXCache.OnFieldVerifying(String name, Object row, Object& newValue, Boolean externalCall)   at PX.Data.PXCache`1.FillWithValues(TNode copy, TNode& item)   at PX.Data.PXCache`1.Insert(Object data, Boolean bypassinterceptor)   at PX.Data.PXCache`1.Insert(Object data, Boolean bypassinterceptor)   at PX.Data.PXCache`1.Update(Object data, Boolean bypassinterceptor)   at PX.Data.PXCache`1.Update(Object data, Boolean bypassinterceptor)

 

Looks like i need to DialogManager’s Ask method to be as Yes, can you please let me know how to set this value, so i can persist the Vendor.

 

 

icon

Best answer by radhikainugala38 19 April 2024, 20:15

View original

1 reply

I see that - with BAccount.View.Answer = WebDialogResult.Yes, I can able to answer the dialogue and this worked.

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