Discussions

 View Only
  • 1.  Copy Record, open new record in Edit

    Posted 11-24-2020 10:40
    Hey QB Community. I'm looking for help with a Formula URL. The use case is:
    1. Open Record
    2. Click Copy Record Formula URL button
    3. Open new record in Edit

    The first formula below copies the record but then opens the old record, because it's reading that record's Record ID#.

    The second formula, I tried adding a display record before the redirect to edit but then it only copies and displays the new copy.

    Number One - Copies record, opens source record in Edit
    URLRoot() & "db/" & Dbid() & "?act=API_AddRecord&apptoken=111&_fid_1=" & URLEncode ([Related Field])
    & "&_fid_40=" & [Field01]
    & "&rdr=" &
    URLEncode(URLRoot() & "db/" & Dbid() &
    "?a=er&rid=" & [Record ID#])


    Number Two - Copies record, opens new record in View

    URLRoot() & "db/" & Dbid() & "?act=API_AddRecord&apptoken=111&_fid_1=" & URLEncode ([Related Field])
    & "&_fid_40=" & [Field01]
    & "&disprec=1"
    & "&rdr=" &
    URLEncode(URLRoot() & "db/" & Dbid() &
    "?a=er&rid=" & [Record ID#])


    ------------------------------
    Heather Bryant
    ------------------------------


  • 2.  RE: Copy Record, open new record in Edit

    Posted 11-24-2020 10:49
    There is not a native way to open in edit mode after API_AddRecord.  The best you can do is to use &disprec=1 and land in view mode. 

    The other option is of course API_GenAddRecordForm and then you  land in ADD mode with fields pre-filled as you like, maybe this is essentially the same for you.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 3.  RE: Copy Record, open new record in Edit

    Posted 11-24-2020 11:00

    Thanks Mark. The GenAddRecordForm is a great solution. This actually solves another issue I was going to have with an automation triggering children records prematurely.

    Saved me again!



    ------------------------------
    Heather Bryant
    ------------------------------