How to override SHIP-TO address in REQUISITION screen using EmployeeID

Userlevel 1

Hello Everyone,


We have a requirement to load the SHIP-TO Address from the employee by default instead of Shipping destination type details.


We have used fielddefaulting event, but it is not assigning the employee address on page load.

We have tried fieldupdating event and we are able to override the address when we update creator, but we are getting a weire issue, i.e., When we complete  removehold process and once we reload the page then again the address is reverting back to the default ship to address instead of employee address.

 protected virtual void RQRequisition_EmployeeID_FieldUpdated(PXCache sender, PXFieldUpdatedEventArgs e, PXFieldUpdated baseEvent)
baseEvent?.Invoke(sender, e);
RQRequisition row = e.Row as RQRequisition;
if (row == null) return;
if (Base.Document.Current != null)
BAccount BaccDetail = PXSelect<BAccount, Where<BAccount.bAccountID, Equal<Required<BAccount.bAccountID>>>>.Select(Base, row.EmployeeID);
if (BaccDetail != null)
Address addressdetail = PXSelect<Address, Where<Address.addressID, Equal<Required<Address.addressID>>>>.Select(Base, BaccDetail.DefAddressID);
if (Base.Shipping_Address.Current != null && addressdetail != null)
Base.Shipping_Address.Current.OverrideAddress = true;
Base.Shipping_Address.Current.AddressLine1 = addressdetail.AddressLine1;
Base.Shipping_Address.Current.AddressLine2 = addressdetail.AddressLine2;
Base.Shipping_Address.Current.City = addressdetail.City;
Base.Shipping_Address.Current.State = addressdetail.State;
Base.Shipping_Address.Current.CountryID = addressdetail.CountryID;
Base.Shipping_Address.Current.PostalCode = addressdetail.PostalCode;


We tried to use shipping destination type to add new option as an employee but didn’t find how to do it as all the SHIP TO panel fields contains attributes which are refereing from location, address, poaddress tables to load the default data in screen. Can anyone provide the approach to override these attributes without deviating acumatica ship to functionality. 

What is the best way to show the employee address by default?




0 replies

Be the first to 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