I am trying to figure out how I can copy certain info from a parent table into a child, I have read through many threads but am still stuck. I have a parent table "Accounts" and I want to be able to copy/autofill certain field in my "Estimate" table. For example when I am creating a new estimate for an existing account, I want to autofill/copy the new estimate with the fields from the parent table. I looked into and tried the copy master and detail option, but am still confused. Could I use a webhook or action to set up a button on the child table/forms to accomplish this? The new record being created will always have the same info I need to autofill. Any help would be great!
If you are creating a Child by a button on the Parent record you can populate any field like this
URLRoot() & "db/" & [_DBID_TIME_RECORDS] & "?a=API_GenAddRecordForm"
& "&_fid_11=" & URLEncode ([Record ID#])& "&_fid_21=" & [Related Client]& "&z=" & Rurl()
you just specify the field to be populated and what goes in it. if the field is a text field its safest to wrap it in URLEncode. The internet does not like certain characters in the code.
But if you're adding children via grid edit then you are going to have to build a pipeline to populate those fields when the record is created.
Great, sounds easy enough and can I populate several fields from this button, or do I need to separate button for each field I want to do it for???
As always, thank you!
No, no, no, just one button. You just keep listing the fields you want to populate vertically in a list like I did for those two fields.