Forum Discussion

LizChartrand's avatar
LizChartrand
Qrew Cadet
5 years ago

Rich Text Button - Not saving record edits

Hello,

I'm trying to set up a rich text button that checks a box and records the user who checked it.
However, from the user standpoint, I'd like them to be able to work on other things in the record and have those edits saved if/ when they push the button, and then continue in the edit view of the record.

In other words, I'd like a user to be able to
1) edit any fields on a record
2) Click the button to check a box and save any edits they've made to the record
3) continue in the edit record view.

Currently, that's not working.

Here's what I have so far:

var text URL =

URLRoot() & "db/" & Dbid() & "?act=API_EditRecord" &
"&rid=" & [Record ID#]
& "&apptoken=##########################"
& "&_fid_2058=" & URLEncode(UserToName(User()))
& "&_fid_2057=true"
& "&rdr=" & URLEncode(URLRoot() & "db/" & Dbid() & "?a=er&rid=" & [Record ID#]);

If([Confirm Additional Agent info]=true,

"<a class='Vibrant' style='border:1px solid #f6f2ef; background-color:#f6f2ef'>Additional Agent Info Confirmed</a>",
"<a class='Vibrant Danger' style='border:1px solid #6BBD57; background-color:#6BBD57'" & "a href=" & $URL & "> Click Here if Additional Agent Info is Complete</a>")

---
I confirmed that I have the "Save parent when child record is added" setting checked for this table.
Any suggestions about why this isn't saving the record after executing the tasks noted in the field?

------------------------------
Liz Chartrand
------------------------------
  • To try to get this debugged, what happens if you make a URL formula field that just does this



    URLRoot() & "db/" & Dbid() & "?act=API_EditRecord" &
    "&rid=" & [Record ID#]
    & "&apptoken=##########################"
    & "&_fid_2058=" & URLEncode(UserToName(User()))
    & "&_fid_2057=true"
    & "&rdr=" & URLEncode(URLRoot() & "db/" & Dbid() & "?a=er&rid=" & [Record ID#])

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • MichaelTamoush's avatar
      MichaelTamoush
      Qrew Captain
      I had a similar thing happen to me - I was expecting to see the 'Saving Record' flash on screen (due to the 'auto save child' checkbox), and it wasn't doing that. Turns out, when I was testing it I wasn't changing any information on the record, so in that case it doesn't save.

      Maybe it's not that, but I believe the auto save should happen BEFORE the the execution of the button, so it seems impossible for it not to save? I'm curious to see what you discover...

      ------------------------------
      Mike Tamoush
      ------------------------------
      • BradLemke's avatar
        BradLemke
        Qrew Assistant Captain
        Formula - Rich Text buttons do not activate the native 'autosave' functionality, but can be coded to initiate the 'save' script. Unfortunately, this is an 'unsupported' security exploit that is being closed in the coming months.

        Formula - Url buttons do activate the native 'autosave' functionality, but they ignore other core functions like Dynamic Form Rules in the process.

        At the moment, if you do not care about your data entry obeying field/form/table rules, use Formula - URL buttons.  If you do care, you can leverage the security exploit by manually coding the save script functions into your rich text buttons - but again, that exploit is being closed in the coming months.

        I do have super-high hopes that there will be a new feature/fieldtype added that will function as a customizable save button before they close the exploit.

        ------------------------------
        Brad Lemke
        ------------------------------
    • LizChartrand's avatar
      LizChartrand
      Qrew Cadet

      Hi Mark,
      The Formula-URL worked just as I needed it saved the work on the record, fired the tasks on the field, and refreshed/reopened the record in edit view. 

      Thank you



      ------------------------------
      Liz Chartrand
      ------------------------------