Jump to content
Salesforce and other SMB Solutions are coming soon. ×

User choice determines billing address


Colin Weir
 Share

Recommended Posts

Posting this here as it seems to encompass layouts, calculations and scripting.

 

I have an invoice which could have one of three possible billing addresses to choose from. I might select one of these from a radio button on a layout. For example the choice would be:

person

insurance company

other

 

What is the best way to then determine this choice and put it on a invoice layout for printing.

 

Im assuming a CASE statement would get me the user choice-does that mean I set up three possible layouts and script to the relevant choice? Or could the billing address be calculated in some way and used one layout?

 

Im sure there's lots of ways of doing this but glad to hear of any tips

 

Ta in advance

 

Colin

Link to comment
Share on other sites

One solution is to store all address data in a separate Address table, where each record is one address, and the Address Type (Person, Company, Other) is stored for each Address.

 

Then in the parent table, you can use a Billing Address Choice field (with a choice of one of the available Address Types from the Address table) to indicate which of the related Addresses is the Billing Address.

 

The chosen Billing Address can then be viewed or looked up from another relationship to the Address table. The relationship would be something like:

 

Contact Address by Billing =

Contact::ContactID = Address by Billing::ContactID

AND Billing Address Choice = Address by Billing::Address Type

Link to comment
Share on other sites

Hi Ender

 

I understand and thanks for that.

 

What if the contact in the parent table contains its own address information and insurance company and its address is in a separate but related table?

 

I'd like to be able to choose which of these I want at the moment I generate the invoice

 

Colin

Link to comment
Share on other sites

I don't have a clear picture of your structure, but I suppose you could just use a set of text fields in the Invoice that use auto-enter calcs to populate the address of whichever billing choice the Contact has selected:

 

case(

Contact::Billing Address Choice = "Home"; Contact::Address;

Contact::Billing Address Choice = "Insurance"; Insurance::Address;

...)

Link to comment
Share on other sites

Yes I think that might work for me. I didnt want to get too deeply into the structure. The key being auto entered text calcs that you suggest.

 

Appreciate your time on this.

Link to comment
Share on other sites

This thread is quite old. Please start a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



×
×
  • Create New...

Important Information

Terms of Use