Forum Discussion

OliverKenfield's avatar
OliverKenfield
Qrew Member
3 years ago

Edit Record button doesn't work (a=er)

Hello,
I have a button and when I use ?a=API_EditRecord&rid= it works, but of course saves the record. I would like the record to stay opened in Edit mode.  So when I use ?a=er&dfid=2&rid= it doesn't update any of the fields.  I need to be able to enter a quantity before I save.  I'm starting to feel crazy, but I had the button working the other day fine, and the next day it didn't work.  

This one updates fields correctly but saves:
URLRoot() & "db/" & Dbid() & "?a=API_EditRecord&rid="
& URLEncode([Record ID#])
&_fid_119=" & URLEncode("Change Qty Requested") //Change Order Status
& "&_fid_110=1" //Changed Item checkbox
& "&_fid_111=" & URLEncode("Waiting on Approval") //Approval Status
& "&_fid_109=" & URLEncode("Waiting on Approval") // Change Status
& "&_fid_114=" & URLEncode([Qty]) // Change Previous QTY
& "&z=" & Rurl()

This one opens the record in edit mode, but doesn't edit the values of any of the specified fields:
URLRoot() & "db/" & Dbid() & "?a=er&dfid=2&rid="
& URLEncode([Record ID#])
& "&_fid_119=" & URLEncode("Change Qty Requested") //Change Order Status
& "&_fid_110=1" //Changed Item checkbox
& "&_fid_111=" & URLEncode("Waiting on Approval") //Approval Status
& "&_fid_109=" & URLEncode("Waiting on Approval") // Change Status
& "&_fid_114=" & URLEncode([Qty]) // Change Previous QTY
& "&z=" & Rurl()

What am I missing here?
  • When you push the button are you in edit mode?  And when pushed you want to save and continue in edit mode?

    ------------------------------
    Mark Shnier (YQC)
    mark.shnier@gmail.com
    ------------------------------
    • OliverKenfield's avatar
      OliverKenfield
      Qrew Member
      Hi Mark,
      When pushed, it does go to the record in edit mode yes.  When pushed I want to be in Edit mode, so I can enter a quantity (in a qty field) and then save and go back to the record I was on.
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        This would edit the record you are on and then land you in edit mode on the same record.

        var text SetValues = 
        URLRoot() & "db/" & Dbid() & "?a=API_EditRecord&rid="
        & URLEncode([Record ID#])
        &_fid_119=" & URLEncode("Change Qty Requested") //Change Order Status
        & "&_fid_110=1" //Changed Item checkbox
        & "&_fid_111=" & URLEncode("Waiting on Approval") //Approval Status
        & "&_fid_109=" & URLEncode("Waiting on Approval") // Change Status
        & "&_fid_114=" & URLEncode([Qty]) ;// Change Previous QTY

        var text EditMode = URLRoot() & "db/" & Dbid() & "?a=er&dfid=2&rid="
        & URLEncode([Record ID#]);

        $SetValues
        & &rdr=" & URLEncode($EditMode)



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