You are probably trying to set calculation fields. You should probably have two sets of fields for shipping and billing.
Let me be a little more specific:
The All Invoices Layout has two addresses, Billing and Shipping. These fields (they are not portals) are set to display contents from the Contact Management Table. Because of the relationship structure (I think?), when my script populates the Customer ID field on the All Invoices layout, the fields for Billing and Shipping automatically populate. As such they are not modifiable (at least I am under this impression.)
The script is set to a button on the Contact Management layout. When a client is ready to place an order, I simply press the 'generate invoice' button, and the Billing and Shipping fields on the All Invoices layout are automatically populated.
Ideally, I'd like to have a button (script) on the same Contact Management layout that generates a 'FP Funding' invoice. This script would populate the Billing Address fields (on the All Invoices layout) with FP Funding's address, and the Shipping Address with the Client's Shipping Address.
I know I will have to change my approach somehow in order to accommodate both scenarios.
Does this info help, or do I need to provide additional info?
Thanks, Mr Vodka!,
Typically with Invoices, the customer billing / shipping address are fields with the lookup option on them. This is because invoices should be a point in time data capture. IOW, if it just related to the customer or address table alone then if the info changes all past invoices would change too.
Does this make sense?
I have taken your advice and changed the Billing and Address fields in the All Invoices layout to be fields in the All Invoices table that Look-Up values in the Contact Management table.
The same automation occurs...that is to say that when I run the 'Create Invoice' script from the Contacts layout, the All Invoices layout appears, a new record os created, and (as before, but via a different procedure) the fields for Billing and Shipping addresses appear automatically. Yeah!
Can I create a script that will change the 'Billing' address info the be that of the Funding Company, and leave the Shipping fields alone?