function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
LeeFrankeLeeFranke 

Functionality Ship Address same as Bill Address

I would like to recreate this functionality on a form. I'm sure I can do it with a VF page, but I think I might be able to do it without creating a VF page.

 

I have 'Bill Address' data populated on the form. When the user changes the checkbox to true, I would like to populate the 'Ship Address' with the data from the 'Bill Address' fields.

 

 

Is it possible? Can someone point me in the right direction of accomplishing this?

 

thanks,

 

lee

 

 

Best Answer chosen by Admin (Salesforce Developers) 
CaptainObviousCaptainObvious

Here's how I would implement this functionality with Clicks, Not Code™ :D

Let's say I have 2 Billing Address fields: Billing_Address_Line1__c and Billing_Address_Line2__c

I also have 2 Shipping Address fields: Shipping_Address_Line1__c and Shipping_Address_Line2__c

... and a checkbox, Use_Billing_Address__c

I would:

  • Set up a Workflow rule to evaluate the checkbox Every time a record is created or edited.
  • For the rule criteria, Use Billing Address equals true
  • Add a field update to copy Billing Address 1 to Shipping Address 1
  • Add a field update to copy Billing Address 2 to Shipping Address 2
  • Activate the workflow rule

It's not the same functionality (you wont see the fields update until you save the record) but it gets the job done!  Note that if the box is checked, the Shipping Address fields will be over-written

All Answers

CaptainObviousCaptainObvious
Is it a web-to-lead form? could you post some code/ html?
LeeFrankeLeeFranke

Not a Web-To-Lead form. Just a Page Layout on a custom object. Not a VF page (yet).

 

We have object that has an address. The sales person is going to ship them something. We want them to be able to override the address that is assigned to that object as well as be able to say 'Use the current Address'.

 

I was hoping that I could get this functionality without having to re-create the page as a VF page.

 

This might be something very simple to do, but my management, in their infinite wisdom, sent me to the 501 class and not the 401 class, so I don't have a great grasp on the non-VF way of creating a form.

 

thanks,

 

lee

CaptainObviousCaptainObvious

Here's how I would implement this functionality with Clicks, Not Code™ :D

Let's say I have 2 Billing Address fields: Billing_Address_Line1__c and Billing_Address_Line2__c

I also have 2 Shipping Address fields: Shipping_Address_Line1__c and Shipping_Address_Line2__c

... and a checkbox, Use_Billing_Address__c

I would:

  • Set up a Workflow rule to evaluate the checkbox Every time a record is created or edited.
  • For the rule criteria, Use Billing Address equals true
  • Add a field update to copy Billing Address 1 to Shipping Address 1
  • Add a field update to copy Billing Address 2 to Shipping Address 2
  • Activate the workflow rule

It's not the same functionality (you wont see the fields update until you save the record) but it gets the job done!  Note that if the box is checked, the Shipping Address fields will be over-written

This was selected as the best answer
LeeFrankeLeeFranke

That was sort of how I was thinking it would work if I could not do it form based.

 

thanks,

 

lee

rajesh ramalingamrajesh ramalingam
 Create a checkbox type fields on Account named "Is Same as Billing Address?". If this checkbox is checked, then mailing address should be equal to billing address? how it will work?