We are using v14.5 and we have a need to update a large number of customer addresses for one country and of course also need to make sure that we also update any associated service orders and contracts etc.
Doing it manually, I can tick the box “Change Address in all records using this address” box to make that happen but is there a way I can update hundreds of addresses via an import or suchlike to get the same result. I don’t need anything in history updated, only Customer Center and anything else active/open.
Thanks
Chris
Page 1 / 1
Hi Chris,
I am not aware of a way to trigger that the change all records be implemented via API. Plus this actually means only updating the records which share the same address_id. So, for example, if you change the address on an item, that item gets a new address_id which is not the same as the site address_id itself. In this scenario, change all records would not be effective.
Site address_id is 123 (making up numbers as I go along for examples)
Create an item on the site - it now has address_id = 123 (change all records would work)
Change the address on the item in the installed item module - now has address_id 432 (change all records would not work).
Same thing applies to records such as service orders where you might change the ship_to_address_id on the order_line or change the address on the labor demand. If Change all addresses is not enabled, any change will create a new address_id.
Perhaps someone else has an idea short of running SQL scripts but I can’t see an API doing this task.
Hi Phil,
Thank you. Yes, I was aware that the address ID would change if someone manually changed the address on an order or item etc. but in that case I would assume that it needs to be different so I would not want to change it (I am foolishly believing that the users are following the rules).
So I would only want the main Customer address and anything else that uses the same address ID to be updated.
Hi Chris,
I understand. In your scenario, you want to update the customer address without changing the address_id that is linked to the customer. Which the UI only does if you have the option to change all records enabled somehow. Maybe this element?
What the possible values are, I don’t know as I normally am not developing API’s but probably Y for global, N for local change. Perhaps someone who is more familiar with developing API’s can answer if this is possible.
Thanks Phil,
I’ll ask around and see if anyone here is familiar, otherwise might need to open a support request.
Thanks and Best Regards
Chris
Hi Chris,
Continuing Phil answer, below is the API sample.
Please make sure you know the address_id and address type you are going to change, because sometime a customer has multiple addresses with the same address type.