5 Replies Latest reply on Apr 10, 2012 3:12 PM by philmodjunk

    Want to make a "New Invoice" button from the Customer page

    JenwaBeaupre

      Title

      Want to make a "New Invoice" button from the Customer page

      Post

      Hello!

       

      I want to search and pull up a customer page and then on the customer page, hit a button that makes a new invoice with their info all plugged in to the invoice. 

      So far, my button opens a new invoice. 

      How do I get it to plug in the relevant customer info? Specifically, how do I build this script in the correct order? 

      So far it reads:

       

      Set Variable [$Customer ID; Value:Customers::Customer ID]

      Go to Layout ["Record Detail-Invoices" (Invoices)]

      New Record/Request

      Set Field [Invoices::Bill To Customer ID]

       

      So what should I change or add to make it do what I want?

       

      Thanks!

      Jenwa

        • 1. Re: Want to make a "New Invoice" button from the Customer page
          philmodjunk

          I would make no changes to your script. What you have should be sufficient. The remaining info can then either appear automatically via fields from the related customer table placed on your layout or via looked up data fields in Invoices defined to copy data from the customers table when Bill To Customer ID get's a new value.

          Is this the Invoices.fp7 starter solution? Let me inow if that's the case and I'll open up that file and provide a more detailed answer based on what exists in that file.

          • 2. Re: Want to make a "New Invoice" button from the Customer page
            JenwaBeaupre

            It is the starter solution, yes.  So far it doesn't show the Customer info. That is something I do in layout?

            • 3. Re: Want to make a "New Invoice" button from the Customer page
              philmodjunk

              The script should result in all of the "bill to" customer fields automatically displaying data from the customer table. The "ship to" fields will not update unless we add one more step to your script to update the "Ship to customer ID" field with the same value.

              What are you seeing on your layout when you run this script?

              Do you see a value appear in the Bill To Customer ID field?

              Have you modified the design of this starter solution in other ways besides adding this button and script?

              • 4. Re: Want to make a "New Invoice" button from the Customer page
                JenwaBeaupre

                Nothing appears. I have been messing around with this for days and I really doubt it is in all its correct settings at this point. I wish I had thought to make two and not mess around with one! I can't even make a new one because Filemaker 10 doesn't have these solutions and Filemaker 11 isn't available on the website anymore... Would you happen to know what the original settings are for Bill to Customer ID field?

                 

                • 5. Re: Want to make a "New Invoice" button from the Customer page
                  philmodjunk

                  Your set up details (those that I can see at least) seem correct and match the original file. A look at Manage | value lists for this value list may reveal other differences, however.

                  If you do not see any value appearing in the Bill to Customer ID field, then it is likely that a value is not being entered into it (maybe there is no value in the variable).

                  Take a close look at the client record that is current where you have put this button. If you haven't already done so, add the customer ID field directly to your customer layout and make sure that there is an ID number in that field to start with.