0

Create linked record button - parent to parent link

I've found the formula to create a new record in a child table, but I can't figure out how to do it with a linked parent table.

 

I have a "Companies" table, a "Contacts" table and an "Interactions" table. I want to add a button in both companies and contacts that will create a linked record in Interactions. Is it possible?

4 replies

null
    • SECOS Group
    • quartz_cap
    • 4 yrs ago
    • Reported - view

    Okay, to clarify: I got it working to bring up the new interaction record, but it isn't linking to the current record. When I try to use this:

     

    let currRec := Id;
    let i := (create '03. Interactions');
    i.('01. Companies/Councils' := currRec));
    popupRecord(record('03. Interactions',i.Id))

     

    I get the error "01. Companies/Councils' not found

    • Birger_H
    • 4 yrs ago
    • Reported - view

    Please try:

    –––
    let currRec := this.Id;
    let i := create '03. Interactions';
    i.('01. Companies/Councils' := currRec));
    popupRecord(i)
    –––

    Birger

    • SECOS Group
    • quartz_cap
    • 4 yrs ago
    • Reported - view

    I changed companies to CRM. Using this formula:

     

    let currRec := this.Id;
    let i := create '03. Interactions';
    i.('01. CRM' := currRec));
    popupRecord(i)

     

    on save turns into:

     

    let currRec := this.Id;
    let i := (create '03. Interactions');
    i.(1.(CRM := currRec))

    • SECOS Group
    • quartz_cap
    • 4 yrs ago
    • Reported - view

    Figured it out. The field in the interactions form is called 'Councils/Companies' so I need to use the same in the formula. So, for anyone having this issue in the future:

     

    let currRec := this.Id;
    let i := create 'NAME OF TABLE YOU WANT TO CREATE A RECORD IN ';
    i.('NAME OF THE TABLE YOU'RE LINKING TO, USING THE FIELD NAME IN THE FORM WHERE YOU'RE CREATING THE RECORD' := currRec));
    popupRecord(i)

Content aside

  • 4 yrs agoLast active
  • 4Replies
  • 1911Views