Discussions

 View Only

Save and redirect to parent record

  • 1.  Save and redirect to parent record

    Posted 03-10-2020 00:28
    Problem: 
    From the parent record a child record is added. When users just save and close the newly created child record they are redirected back to the parent record, but if they use the native save and keep working button, then later use the native save and close button, they are redirected to a view mode of the child record they were editing instead of being redirected back to the original parent record.

    Solution thus far: 2 buttons.
    1st button is a custom formula - rich text "Save and Keep Working" button.  
    "<a class='Vibrant Success' onclick=$('#footerSaveAndKeepWorkingMenuOption').click();>Save and Keep Working</a>"
    This works with no issues as it's pretty straight forward.

    2nd button is a custom save and redirect back to parent button.
    This is where I'm having all sorts of problems.  I've tried a formula - url with no success.
    URLRoot() & "db/" & [_DBID_LINE_ITEMS] & "?a=API_GenAddRecordForm&_fid_77=" & URLEncode ([Record ID#]) & "&z=" & Rurl()

    Projects is the parent table.
    Line Items is the child table. 
    fid_77 is the [# Related Project] field from the Line Items table.

    Please advise.

    Cheers.

     ​

    ------------------------------
    T$
    ------------------------------