jrossausiscom
5 years agoQrew Assistant Captain
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)
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
------------------------------
- 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
------------------------------