Change Location DescriptionField attribute to pull from another DAC

57 Views Asked by At

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

Normal:

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:

ID Only

Drop down fine Drop Down

I have tried using the field from a different DAC but it just shows as blank

0

There are 0 best solutions below