Evan,
Thanks for the very detailed response. I very much appreciate it. Sorry for the delayed follow-up on my end. I have been on vacation for the past few days.
Yes, that is how I have the tables set up.
I understand how your Option #2 works, in theory. However, for it to work as you suggest, wouldn't the Work Order Record ID would first need to be generated? Meaning the work order would need to be saved so that it had an associated Record ID# first, before the automation can run, right?
With how the process flow works currently, generating the Work Order first, then manually going back in to edit it to click a button breaks the flow somewhat.
Also, if we set it up to generate a new child and grandchild record each time it was edited, we would have more children records than really are needed. The Grandparent record will be edited multiple times throughout the process, so we don't want to generate a child/grandchild record each time.
However, after reading through your suggestion, I had a thought, but am not sure if it will work.
Ideally, from within the work order form, if I click on "Add new Job", the code in the button would save the Work Order (thus generating a Record ID#), and then also generate a new job record, taking me back to the Work Order form in edit mode.
By doing it this way, I wouldn't need to worry about saving the return pat back to the Work Order from the Jobs form.
I have the code to save and keep working. It is currently in a Formula Rich Text button:
"<div class='Vibrant Success' onclick=$('#footerSaveAndKeepWorkingMenuOption').click();>Save and Keep Working</div>"
I also have the code to generate a new Job, take me back to the Work Order in edit mode. It is currently in a Formula URL button:
URLRoot() & "db/" & [_DBID_JOBS] & "?act=API_AddRecord"
& "&_fid_16=" & URLEncode ([Work Order ID#])
& "&rdr=" & Dbid()& URLEncode("?a=er&rid="&[Work Order ID#])
I was hoping to combine them both into a single button, so that it first runs the "Save & Keep working" and then generates the Job.
I tried the following:
"<div class='Vibrant Success' onclick=$('#footerSaveAndKeepWorkingMenuOption').click();>Save and Keep Working</div>"
& URLRoot() & "db/" & [_DBID_JOBS] & "?act=API_AddRecord"
& "&_fid_16=" & URLEncode ([Work Order ID#])
& "&rdr=" & Dbid()& URLEncode("?a=er&rid="&[Work Order ID#])
However, when I went to combine them, I get an error message. I am sure it is due to my lack of experience in syntax and combining different coding types.
Any thoughts? Do you think something similar to the above would work? I am trying to make it as simple as possible.
------------------------------
Andrew
andrew.fry25@gmail.com
------------------------------