Forum Discussion

MarkShnier__You's avatar
MarkShnier__You
Icon for Qrew Legend rankQrew Legend
4 years ago

API_AddRecord and land the user in edit mode.

This works to works to create a record and land the user in View mode.

URLRoot() & "db/" & [_DBID_SKTDS] & "?act=API_AddRecord"
& "&_fid_6=" & URLEncode([Supplier])
& "&disprec=1";


Is there any way to land the user in edit mode?


------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------
  • We are currently trying to do the same thing with no success, use a Formula URL field to call API_AddRecord then redirect to Edit mode of the new record. I was hoping to use %%rid%% in the redirect URL but that errors out. The "&disprec=1" does not work either, it sends me to the XML response from the API_AddRecord instead of View mode.

    Has anyone been able to figure this one out in the couple weeks since this was originally posted?

    ------------------------------
    Oana Toma
    ------------------------------
    • Melissa_Doran's avatar
      Melissa_Doran
      Qrew Cadet
      I've seen some solution used by someone else where there is a helper table that calcs max RID, then if you add 1 to that it should relay to the newest record if used in a formula URL w/ a=er and RID=Maxrecord+1. 

      Have not tested this, but don't see why it would not work.

      ------------------------------
      Melissa Doran
      Jr Solutions Consultant
      Quandary Consulting Group

      linkedin.com/in/melissardoran
      mdoran@quandarycg.com
      ------------------------------
    • MikeTamoush's avatar
      MikeTamoush
      Qrew Commander
      What is the error you get with %%rid%%. Ive only used it once I think, but I remember having success? Perhaps I only used it in GenAddRecord.....

      ------------------------------
      Mike Tamoush
      ------------------------------
  • what is the &disprec=1 ? Is that new?

    ------------------------------
    Mike Tamoush
    ------------------------------
    • MarkShnier__You's avatar
      MarkShnier__You
      Icon for Qrew Legend rankQrew Legend
      &disprec=1 is not new.

      It's a parameter that basically says when you get done adding the record then display the record equals true.  In  other words land the user on the record in View mode.

      ------------------------------
      Mark Shnier (YQC)
      mark.shnier@gmail.com
      ------------------------------