Question

Change Location DescriptionField attribute to pull from another DAC

  • 28 February 2024
  • 4 replies
  • 169 views

Hi,

I need to change what displays on the SO screen when selected a Location.    By default, it is
LocationCD - Descr

 

 

We want to change it to LocationCD - AddressLine1

I can add the field easy enough in the Selector, but how can I add it to the DescriptionField ?  If I change it to

  • DescriptionField = typeof(Address.addressLine1),

It just shows the locationCD on screen. 

I realize it is from a different DAC, so I guess the question is how do I get the info from the other DAC?

 

Thanks in advance.

 

[PXCustomizeSelectorColumns(
typeof(PX.Objects.CR.Location.locationCD),
typeof(PX.Objects.CR.Location.descr),
typeof(PX.Objects.CR.Address.addressLine1))]

[LocationActive(typeof(Where<Location.bAccountID, Equal<Current<SOOrder.customerID>>,
And<MatchWithBranch<Location.cBranchID>>>),
typeof(InnerJoin<Address, On<Location.defAddressID, Equal<Address.addressID>>>),
DescriptionField = typeof(Location.descr), Visibility = PXUIVisibility.SelectorVisible)]



[PXDefault(typeof(Coalesce<Search2<BAccountR.defLocationID,
InnerJoin<CRLocation, On<CRLocation.bAccountID, Equal<BAccountR.bAccountID>, And<CRLocation.locationID, Equal<BAccountR.defLocationID>>>>,
Where<BAccountR.bAccountID, Equal<Current<SOOrder.customerID>>,
And<CRLocation.isActive, Equal<True>,
And<MatchWithBranch<CRLocation.cBranchID>>>>>,
Search<CRLocation.locationID,
Where<CRLocation.bAccountID, Equal<Current<SOOrder.customerID>>,
And<CRLocation.isActive, Equal<True>, And<MatchWithBranch<CRLocation.cBranchID>>>>>>))]
[PXForeignReference(
typeof(CompositeKey<
Field<SOOrder.customerID>.IsRelatedTo<Location.bAccountID>,
Field<SOOrder.customerLocationID>.IsRelatedTo<Location.locationID>,
Field<Location.defAddressID>.IsRelatedTo<Address.addressID>
>))]

 

When I change
DescriptionField = typeof(Address.addressLine1)

It just shows the ID:


Drop down fine

 


4 replies

Userlevel 7
Badge +17

@aallande  You need to add the DisplayMode property as “Hint” for the Selector field in the .aspx page like below.

 

 

Naveen,

Thank you for your response.  However the “Description” is from a different DAC. 

If I just add “Hint” as you note, it doesn’t change anything.   I need to specify where, in your case, “Test Description” is coming from.  I want it to come from Address.AddressLine1 where the field is Location.LocationID.
 

So in the end it will say “LocationID - AddressLine1”   Not “LocationID-LocationDescription”

Appreciate any further insight

@Naveen Boga 

Naveen,

Thank you for your response.  However the “Description” is from a different DAC. 

If I just add “Hint” as you note, it doesn’t change anything.   I need to specify where, in your case, “Test Description” is coming from.  I want it to come from Address.AddressLine1 where the field is Location.LocationID.
 

So in the end it will say “LocationID - AddressLine1”   Not “LocationID-LocationDescription”

Appreciate any further insight

Userlevel 7
Badge

Hi @aallande were you able to find a solution? Thank you!

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