+ Start a Discussion

Trying to Copy Mailing Address to Billing Address

copyAddr('00N50000001NZQN', '00N50000001NZPH', '00N50000001NZQF', '00N50000001NZPz', '00N50000001NZP7', 'acc17street', 'acc17city', 'acc17zip', 'acc17country', 'acc17state', true, true)

I am trying to use the above as a Custom S-Control or a Button, but neither works.

Please help!
Hello Nerv123,

If you are on the Account object you will only need to display the 'Address Information' header in the page layout. There is already a standard link while in the Edit mode that will populate the Shipping with the Billing addresses.

If you want to utilize a custom link type solution you can use the following:


This will update the fields, save the record, and leave you on the same page. If you want it to go the other way you will need to change the 18s to 17s and change Billing to Shipping.

Thanks for the suggestion.  We have attempted to do as you say.  The new code we inputed is as follows.


We are still having a few problems.  When we go into the account to test, we get this code back:

/0015000000MkeeZ/e—retURL=/0015000000MkeeZ&acc17street=P.O. Box 606&acc17city=Eagle&acc17state=CO&acc17zip=81631&acc17country=United States&save=1

We would appreciate any suggestions.

I see that my code didn't get posted exactly correct. The character after the e '/{!Account.Id}/e' should be a question mark and not a hyphen. it should start at:

For some reason it tries to change it even in the code tags. Us a ? instead of - and it should work.