Solved

Add Address details to the existing selector field

  • 27 December 2022
  • 5 replies
  • 191 views

Userlevel 3
Badge

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 .

icon

Best answer by Naveen Boga 27 December 2022, 14:09

View original

5 replies

Userlevel 7
Badge +17

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

 

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

Userlevel 4
Badge +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.

Userlevel 3
Badge

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?

Userlevel 5
Badge +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?

 

Userlevel 5
Badge +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


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