Forum Discussion

JohnRoss2's avatar
JohnRoss2
Qrew Assistant Captain
4 years ago

Create Records in Multiple Tables and use their Record ID's in one URL Button?

Trying to setup a URL Button that will do the following from the Deployed Unit Record.  (Think of it as the master record)

  • Create a Job Record in the Job Table, Relate it to the Deployed Unit Record, fill out some fields (that part is easy)
  • Create a Staging Request Record in the Staging Table under said Job, relate it to the freshly made job, fill out some fields
  • Create a Shipment Record in the Shipping Table under the Staging Request, related it to the freshly made Job, Deployed Unit AND Staging Request, fill out some fields
  • Create a Transaction Record in the Transaction Table, related it to the freshly made Job AND Staging Request, fill out some fields.
  • Make a Copy of the Related Cost Template Record, Related it to the Job and Staging Request, fill out some fields
  • Make a Copy of the Related Financial Template Record, Related it to the Job and Staging Request, fill out some fields
  • Create an Email Record in the Email Table, Related it to the job AND the Deployed Unit.

My main questions are... can this be done with a single URL Button?  How do I have it create the new records, save them, and then allow me to use their new Record ID to continue down the line?  Bonus points if we can have a popup window notify the user when the process is completed.

Note: I could do this all with an automation, but for this type of situation we need maximum reliability and we already have too many automations as it is.  Generally we have found scripts such as this to be more reliable and controllable.  That is why I am working on it as a button.

Thank you all

------------------------------
John Ross
------------------------------

5 Replies

  • I think that an  Automation is the only native way to go.

    The showstopper with a URL formula button is that there is no way to get the Record ID# of the freshly created record.  Other than that,  the only way is a Pipeline or a script code page.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • JohnRoss2's avatar
      JohnRoss2
      Qrew Assistant Captain
      Hey Mark, big thanks as always for your reply.  Understood on the showstopper, but you did catch my attention with a script code page.  Is that some kind of new feature?

      ------------------------------
      John Ross
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        No it's not a new feature.  But you need to know how to write real code to make a code page.  It's not "low code -no code".  It's real code.  Javascript, I believe.

        ------------------------------
        Mark Shnier (YQC)
        Quick Base Solution Provider
        Your Quick Base Coach
        http://QuickBaseCoach.com
        mark.shnier@gmail.com
        ------------------------------