Fetch a complete address in custom field of Purchase Order

I am quite sure that is the behaviour.

However I need help to fetch address using a custom script. I have gone through several links where different answers to this question have been posted but they have not seemed to work for me.

I need an answer to the the same question asked here but the answer seems outdated,

Also, a variant of that is present here.

I have so far not been able to pull the complete address when the address name is selected. A simple fetch will not work because the address is made up of multiple lines.

Look forward to this and I see that this is such a typical question that its answer should go in the custom script examples.

Regards