Solved

Custom Field Help: Address Line 1

  • 6 March 2023
  • 1 reply
  • 68 views

Userlevel 4
Badge +11

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,

icon

Best answer by Technical Outlaws 9 March 2023, 15:05

View original

1 reply

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