Hello everyone,
I have a FieldUpdated handler for SOOrder.ShipVia which works fine, but upon saving, Acumatica throws the error ‘Another process has updated the ‘SOAddress’ record.
if (e.Row.ShipVia == "W" && oldValue != "W")
{
INSite site = INSite.PK.Find(Base, order.DefaultSiteID);
if (site != null)
{
Address siteAddr = Address.PK.Find(Base, site.AddressID);
if (siteAddr != null)
{
SOShippingAddress address = Base.Shipping_Address.Current = Base.Shipping_Address.Select();
if (address != null)
{
address.OverrideAddress = true;
Base.Shipping_Address.Update(address);
address = Base.Shipping_Address.Current;
address.AddressLine1 = siteAddr.AddressLine1;
address.AddressLine2 = siteAddr.AddressLine2;
address.City = siteAddr.City;
address.CountryID = siteAddr.CountryID;
address.State = siteAddr.State;
address.PostalCode = siteAddr.PostalCode;
Base.Shipping_Address.Update(address);
Base.Shipping_Address.Cache.IsDirty = true;
}
}
else
{
throw new PXSetPropertyException(Helper.Messages.ShippingAddressForWalkIn, PXErrorLevel.Error);
}
}Debugging takes me to the end of the file.
This is the trace:
at PX.Data.PXFirstChanceExceptionLogger.ProfilerFirstChanceException(Object o, FirstChanceExceptionEventArgs args)
at PX.Data.PXCache`1.PersistUpdated(Object row, Boolean bypassInterceptor)
at PX.Objects.CS.SharedRecordAttribute.RowPersisting(PXCache sender, PXRowPersistingEventArgs e)
at PX.Objects.SO.SOAddressAttribute.RowPersisting(PXCache sender, PXRowPersistingEventArgs e)
at PX.Data.PXCache.AttributeHandlersSquasher`1.<>c__DisplayClass2_0`1.<To>b__0(PXCache cache, TArgs args)
at PX.Data.PXCache.OnRowPersisting(Object item, PXDBOperation operation)
at PX.Data.PXCache`1.PersistUpdated(Object row, Boolean bypassInterceptor)
at PX.Data.PXCache`1.Persist(PXDBOperation operation)
at PX.Data.PXGraph.Persister.Persist(Type cacheType, PXDBOperation operation)
at PX.Data.PXGraph.PerformPersist(IPersistPerformer persister)
at PX.Data.PXGraph.TransactionalPersist()
at PX.Data.PXGraph.RetryTransaction(Action persistBody, Int32 maxRetries)
at PX.Data.PXGraph.Persist()
at PX.Objects.SO.SOOrderEntry.PersistImpl()
at PX.Objects.SO.SOOrderEntry.Persist()
at PX.Objects.CC.GraphExtensions.SOOrderEntryPayLink.Persist(Action baseMethod)
at PX.Objects.Extensions.ProcessAffectedEntitiesInPrimaryGraphBase`4.Persist(Action basePersist)
at PX.Objects.Extensions.ProcessAffectedEntitiesInPrimaryGraphBase`4.Persist(Action basePersist)
at PX.Objects.Extensions.ProcessAffectedEntitiesInPrimaryGraphBase`4.Persist(Action basePersist)
at PX.Objects.SO.GraphExtensions.SOOrderEntryExt.CreatePaymentAPIExt.Persist(PersistDelegate baseMethod)
at PX.Objects.Common.GraphExtensions.Abstract.TransactionZeroBaseQtyValidationExtension`3.Persist(Action basePersist)
at PX.Data.PXSave`1.<HandlerInternal>g__Persist|3_2()
at PX.Data.PXSave`1.<HandlerInternal>d__3.MoveNext()
at PX.Data.PXAction`1.<Press>d__39.MoveNext()
at PX.Web.UI.PXBaseDataSource.tryExecutePendingCommand(String viewName, String[] sortcolumns, Boolean[] descendings, Object[] searches, Object[] parameters, PXFilterRow[] filters, DataSourceSelectArguments arguments, Boolean& closeWindowRequired, Int32& adapterStartRow, Int32& adapterTotalRows)
at PX.Web.UI.PXBaseDataSource.ExecuteSelect(String viewName, DataSourceSelectArguments arguments, PXDSSelectArguments pxarguments)
at PX.Web.UI.PXDataSource.ExecuteSelect(String viewName, DataSourceSelectArguments arguments, PXDSSelectArguments pxarguments)
at PX.Web.UI.PXDataSourceView.Select(DataSourceSelectArguments arguments, PXDSSelectArguments swarguments, DataSourceViewSelectCallback callback)
at PX.Web.UI.PXFormDataProvider.DataBind()
at PX.Web.UI.PXCallbackManager.CollectDataControls(Dictionary`2 controlsDic, List`1 controlsList)
at PX.Web.UI.PXCallbackManager.RenderClientData(PXCallbackResultMethod resultMethod, XmlWriter writer)
at PX.Web.UI.PXCallbackManager.GetCallbackResultInternal(PXCallbackResultMethod resultMethod)
at PX.Web.UI.PXCallbackManager.GetCallbackResult(PXCallbackResultMethod resultMethod)
at System.Web.UI.Page.RenderCallback()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at PX.Web.UI.PXPage.ProcessRequest(HttpContext context)
at ASP.cstpublished_pages_so_so301000_aspx.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.<>c__DisplayClass285_0.<ExecuteStepImpl>b__0()
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
at System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)
at System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)
at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)
at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)
at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)
at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
Has anyone experienced anything similar before?