Solved

Can you configure the system to carry the Default Location from an Opportunity through to the Project Address on a Project?

  • 27 July 2021
  • 5 replies
  • 294 views

Userlevel 2

Is there an easy way to get the Project Address to auto-populate with the Default Location (the shipping Location ID specified on the Opportunity)?

 

 

icon

Best answer by Naveen Boga 27 July 2021, 19:17

View original

5 replies

Userlevel 6
Badge +4

Do you have access to a developer resource?  If the business case is approved for development, they should be able to add a FieldUpdated event handler (into a customization project) on the location field to lookup the address information of the location and push it into the project address.  I’m not sure of any other ways this could be done “in-line” during data entry.

Userlevel 7
Badge +17

Hi @cwalton3   Here is the customization code. Please add this to package package and deploy. 

Hope this helps!!

 

 public class ProjectEntryExt : PXGraphExtension<ProjectEntry>
{

protected virtual void _(Events.FieldUpdated<PMProject, PMProject.locationID> e, PXFieldUpdated InvokeBaseHandler)
{
InvokeBaseHandler?.Invoke(e.Cache, e.Args);

PMProject row = e.Row as PMProject;
if (row != null)
{
Address objAddress = PXSelectJoin<Address, InnerJoin<Location, On<Location.bAccountID, Equal<Address.bAccountID>,
And<Location.defAddressID, Equal<Address.addressID>>>>,
//Where<Address.bAccountID, Equal<Required<Address.bAccountID>>,
Where<Location.locationID, Equal<Required<Location.locationID>>>>.Select(Base, /*row.CustomerID,*/ row.LocationID);
if (objAddress != null)
{
if (Base.Site_Address.Current != null)
{
Base.Site_Address.Current.AddressLine1 = objAddress.AddressLine1;
Base.Site_Address.Current.AddressLine2 = objAddress.AddressLine2;
Base.Site_Address.Current.City = objAddress.City;
Base.Site_Address.Current.State = objAddress.State;
Base.Site_Address.Current.CountryID = objAddress.CountryID;
Base.Site_Address.Current.PostalCode = objAddress.PostalCode;
}
}
}
}
}

Userlevel 2

@brianstevens  @Naveen B I wanted to thank you both for your responses. both were very helpful as a non-developer/techno-functional consultant. 

Badge

Does anyone know why this is not an out-of-the-box function yet?  These fields have been there for a few major versions.  @Naveen Boga thanks for the code, but I hope this is on the roadmap as a default feature when using CRM with Projects.  

Userlevel 4
Badge +1

This is similar to the following.  Please up-vote this idea.  There is in fact a permanent solution coming.

 

On 23R1, please use the work around of selecting the Override option on the Project Quotes form (PM304500) in the Project Address section (see the screenshot below). This will preserve the address and it will be carried on to the project.

screenshot-1.png

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