Skip to main content
Solved

Custom Field Help: Address Line 1

  • March 6, 2023
  • 1 reply
  • 115 views

Forum|alt.badge.img+12

I want to pull the Address Line 1 and Post Code from Location Addresses into Serial Objects using the Location ID as the Key.

 

I cannot work out how best to achieve this and wondered if anyone could point me in the right direction?

Thanks,

Best answer by Technical Outlaws

You could create a read-only custom field that utilises an expression or select statement.  The only thing for you to consider is how to handle locations with multiple addresses?!

 

Utilising the methods in Location_Party_Address_API seems quite straightforward but you need to know the address_info_id as it is part of the key.  The identity_ argument can be NULL.

Address Line 1

Location_Party_Address_API.Get_Primary_Cust_Address1(location_id_, address_info_id_, identity_)

Post Code

Location_Party_Address_API.Get_Primary_Cust_Zip_Code(location_id_, address_info_id_, identity_)

 

Alternatively, you could write a select statement querying location_party_address using just location id and returning the first record (rownum=1) if you assume that you only ever have one address against the location.

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

Technical Outlaws
Hero (Employee)
Forum|alt.badge.img+11

You could create a read-only custom field that utilises an expression or select statement.  The only thing for you to consider is how to handle locations with multiple addresses?!

 

Utilising the methods in Location_Party_Address_API seems quite straightforward but you need to know the address_info_id as it is part of the key.  The identity_ argument can be NULL.

Address Line 1

Location_Party_Address_API.Get_Primary_Cust_Address1(location_id_, address_info_id_, identity_)

Post Code

Location_Party_Address_API.Get_Primary_Cust_Zip_Code(location_id_, address_info_id_, identity_)

 

Alternatively, you could write a select statement querying location_party_address using just location id and returning the first record (rownum=1) if you assume that you only ever have one address against the location.


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