4 Replies Latest reply on Feb 3, 2010 11:55 AM by paintboothguy

    Populate a field that is not modifiable?

    paintboothguy

      Title

      Populate a field that is not modifiable?

      Post

      Good Morning All, 

       

      I have a relationship structure as follows:

      Products>Line Items>All Invoices>Contact Management.

       

      I have written a script that when run from the Contacts layout, will create a new record in the All Invoices layout, populate the Contact ID # field, which then automatically fills in the client's billing and shipping info.  Works great.

       

      Now I have a new need.

       

      At times I must generate an invoice billable to the Leasing company, but shipped to the client.  When I try to have a script populate the 'Billing Address' with that of the Leasing company, it tells me that the 'fields are not modifiable.'

       

      Can anyone see a flaw in what I am trying to accomplish?

       

      Thanks,

      Andrew 

        • 1. Re: Populate a field that is not modifiable?
          mrvodka
            

          You are probably trying to set calculation fields. You should probably have two sets of fields for shipping and billing.

          • 2. Re: Populate a field that is not modifiable?
            paintboothguy
              

            Mr Vodka, 

             

            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!,

            -Andrew 

            • 3. Re: Populate a field that is not modifiable?
              mrvodka
                

              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?

              • 4. Re: Populate a field that is not modifiable?
                paintboothguy
                  

                Mr Vodka, 

                 

                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!

                 

                Now,

                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?

                 

                Thanks,

                -Andrew