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.