Forum Discussion

Re: New functionaility %%rid%%

Thanks, Ill try that and get with customer support if needed. Appreciate your insight.

------------------------------
Mike Tamoush
------------------------------

3 Replies

  • AnneMurray's avatar
    AnneMurray
    Qrew Member
    Make sure you make an edit on the add record, then press the button.  Otherwise, it will not work.  This has tripped me up twice now...

    ------------------------------
    Anne Murray
    ------------------------------
    • MarkShnier__You's avatar
      MarkShnier__You
      Icon for Qrew Legend rankQrew Legend
      Just posting some code that worked. The goal was to add a record and return the user to the added record in Edit mode.

      var text RID = "%%rid%%";

      var text AddShipment = URLRoot() & "db/" & Dbid() & "?a=nwr";
      var text EditShipment = URLRoot() & "db/" & Dbid() & "?a=er&rid=" ;

      var text URL =
      $AddShipment
      & "&rdr=" & URLEncode($EditShipment) & $RID;


      "<a class='SaveBeforeNavigating' data-replaceRid=true style=\"text-decoration:none; background: #4b7097; border-radius: 5px; color: #ffffff; display: inline-block; padding: 0px 0px 0px 0px; width:100px; text-align: center; text-shadow: none; border: 2px solid #030404; font-size: 12px \"href='"
      & $URL
      & "'>Save and Display in Edit Mode</a>"

      NOTE: The %%RID%% does not seem to like being URLEncoded.

      The use case might be to land the user on a saved record so that the Report Link fields would immediately populate.

      ------------------------------
      Mark Shnier (YQC)
      mark.shnier@gmail.com
      ------------------------------
      • MikeTamoush's avatar
        MikeTamoush
        Qrew Commander
        Thanks Mark. I bet that my original issue was that it was, in the end, URL Endcoded. I thought it wasn't because it wasn't URLEncoded in my variable, but looking back I see it ended up inside a URLEncode anyways...!

        ------------------------------
        Mike Tamoush
        ------------------------------