Skip to main content
Solved

Add Address details to the existing selector field

  • 27 December 2022
  • 5 replies
  • 280 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

View original
Did this topic help you find an answer to your question?

5 replies

Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3381 replies
  • 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
  • 16 replies
  • 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+1

@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+1

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.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings