Discussions

 View Only
  • 1.  Edit Record button doesn't work (a=er)

    Posted 05-17-2022 15:23
    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?


  • 2.  RE: Edit Record button doesn't work (a=er)

    Posted 05-17-2022 15:45
    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
    ------------------------------



  • 3.  RE: Edit Record button doesn't work (a=er)

    Posted 05-17-2022 15:52
    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.


  • 4.  RE: Edit Record button doesn't work (a=er)

    Posted 05-17-2022 17:32
    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
    ------------------------------



  • 5.  RE: Edit Record button doesn't work (a=er)

    Posted 05-17-2022 17:54
    Hi Mark, thank you much!  That works mostly.  Is there a way where it doesn't actually save it until the person hit's Save?  Right now it updates the fields, and then uses Edit mode.  Which is great, it just doesn't allow a person to make a mistake and back out without saving.


  • 6.  RE: Edit Record button doesn't work (a=er)

    Posted 05-17-2022 19:36
    If you don't want it to save - which is the whole point of this button, then you need to do this with simple form rules instead.  You make a checkbox to trigger a form rule to do those changes, and then the last step of the form rule actions is to uncheck the checkbox.

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