Skip to main content
Answer

Add Address details to the existing selector field

  • December 27, 2022
  • 5 replies
  • 345 views

Forum|alt.badge.img

Hello Everyone,

 

kindly advise, How to add below Addressline1 & Addressline2 details from customer Location screen(AR303020) to existing Sales Order screen(SO301000) in Location field.

 

 

 




​​​​

 

Data Class: SOOrder and field name is CustomerLocationID from Sales Order screen .

Best answer by Naveen Boga

Hi @sujithra  Please refer the below to add the fields in the selector columns.

 

https://asiablog.acumatica.com/2015/10/customizing-selector-attributes.html

5 replies

Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • Answer
  • December 27, 2022

Hi @sujithra  Please refer the below to add the fields in the selector columns.

 

https://asiablog.acumatica.com/2015/10/customizing-selector-attributes.html


Forum|alt.badge.img+1

Hi @sujithra,

 Please check the below link:

https://www.info-sourcing.com/how-to-add-fields-to-acumatica-selector-lookup-no-coding/

 

Hope this may help you!

 

Thanks,

Moulali Shaik.


Forum|alt.badge.img
  • Author
  • Freshman II
  • December 28, 2022

Thanks for your Prompt response @Naveen Boga.

Now i want to add the AddressLine1 and Addressline2 in Service Order screen. Do i need to follow the same or Can you please provide the link?


nathantrauscht
Semi-Pro II
Forum|alt.badge.img

@Naveen Boga @sujithra 

 

I tried to follow the instructions from https://asiablog.acumatica.com/2015/10/customizing-selector-attributes.html in order to add Address Line 1.

 

But, the Original attributes for CustomerLocationID are different than in the instructions. Maybe it was changed in an update?

 

Original attributes (Verison 2022 R2 - 22.202.0040):

[LocationActive(typeof(Where<Location.bAccountID, Equal<Current<SOOrder.customerID>>,
And<MatchWithBranch<Location.cBranchID>>>), 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>
>))]

 

I tried to insert the new lines via Replace Original:

[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>
>))]

But, when I Preview Changes (preview layout changes without publication), I see no changes to the column selector. Any ideas?

 


nathantrauscht
Semi-Pro II
Forum|alt.badge.img

Turns out Replace Original:

[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>
>))]

 

Is correct, after publishing and testing Address Line 1 did show in the columns.