How to duplicate a record with reference to the original one?
I am using a button-script like this
let d := duplicate(this);
d.(“Yes / No” := false);
d.(Customer := 0);
popupRecord(d)
This duplicates the record and empties the fields: “Yes / No” and Customer. Αll other fields will be cloned.
My question: how can I include the following function: I want the duplicate record automatically contain a reference to the original record where it was copied from. For thsi I already created a“Link to” field. How to formulate this as part of the button script?
Best regards Robert
5 replies
- 
  let me := this; d.(“Link to” := me) 
- 
  Bello Alain, thanks for quick reponse. It works like a charm! 
- 
  Robert, what type of field was the "Link to" field? Regards, Rijard 
- 
  Hello Rijard, this is a reference field to the same table. See screenshot. Hope this helps! 
- 
  
Content aside
- 4 yrs agoLast active
- 5Replies
- 704Views
