3 Replies Latest reply on Aug 30, 2012 6:11 AM by philmodjunk

    How to be able to enter data in address field in sales table and in contacts table

    PeterMontague

      Title

      How to be able to enter data in address field in sales table and in contacts table

      Post

      I have set up a new sales table on my database. This works well with my line items table and my inventory table.

      I would like to be able to enter my customer's address when I make a sale in the sales table and for the address to be automatically entered into the contacts table. I would also like to be able to enter the address in the contacts table too and then be able to type the customer id into the sales table and for the address just to appear.

      At the moment the relationship is allowing for the creation of records in both the contacts table and the sales table via this relationship. 

      But its not working for me.

      Can somebody tell me what am I doing wrong?

        • 1. Re: How to be able to enter data in address field in sales table and in contacts table
          philmodjunk

          "allow creation of records via this relationship" has a different purpose than what you need here.

          First you have a business rules issue to resolve.

          Should your sales record store a copy of the address or just reference whatever address is currently recorded for the customer in contacts?

          Both methods are possible and both have pros and cons. Many businesses keep a copy of the customer's contact info in their invoices or sales records so that they have a record of what contact info was current at the time the transaction was completed. Say a customer complains that a product was never delivered, if you have a copy of that address, you can see to what address the product was shipped--which could be different from the address currently stored in contacts as the customer's address could have been updated since the time the sales transaction was concluded.

          On the other hand, a direct link to the contact address means you never need to update the address on your sales layout as any changes to the contact record's address will automatically appear on your sales layout.

          And is this your relationship?

          Contacts::ContactID = Sales::ContactID

          (You may have different names)

          • 2. Re: How to be able to enter data in address field in sales table and in contacts table
            PeterMontague

            Firstly I think that we would be better if we chose to have the option where we have the address the product was delivered to in the sales table. So you have helped me resolve that issue. Thank you.

            Secondly, yes we have the above relationship set up. It is Contacts::ContactID = Sales::CustomerID.

             

            • 3. Re: How to be able to enter data in address field in sales table and in contacts table
              philmodjunk

              open Manage | database | Relationships

              Find the address field in your sales table. Double click it to open Field Options.

              Select the auto-enter tab.

              You can use the Looked up Value setting to specify that the field copy the address from the corresponding field in Contacts. Then, every time you enter or select a contact ID, in the Sales Table, the contacts's address will be copied to the address field in the Sales Table. You can repeat these steps for each field in Sales that needs to copy data from a matching field in Contacts.

              Auto-enter Calculations can also be used instead of a looked up value setting to copy the data.