I want to copy field data from one object to another with a click on a button.
I want to get a snapshot of the current family status and copy the data from related son and father data.
I have an custom object son with the following fields:
s_name, s_street and father, where father is a lookup to object father, which has the fields f_name and f_age.
I want to have a button on the son page, saying new family, which populates another custom object family with the respective fields from the originating objects: s_name, s_street etc.
How would I realize such a copy action via Apex?