I am curious if the code I infused into one of my forms using the image onload technique will run when the form is edited via the Edit Record API call?

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered
Photo of JT

JT

  • 0 Points

Posted 4 years ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 67,780 Points 50k badge 2x thumb
I am no image unload expert but I can't imagine how inserting code onto a webpage would be detected when you use the API to edit a record. One has nothing to do with the other.
Photo of Jack

Jack, Champion

  • 50 Points
Agree with the above, unless you find a way to actually load the form page via the call, add a small few second pause and then execute the remaining code and redirect the user. The code only works if the form page is loaded.
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,074 Points 20k badge 2x thumb
>...  when the form is edited via the Edit Record API call?

You are using confusing terms. Forms are not edited via API_EditRecord - rather Records are edited via API_EditRecord.
Photo of Jack

Jack, Champion

  • 50 Points
That was the point I was trying to make, you would have to open the form in a mode (view/edit/add), you can use the api to redirect a user to a form open in edit mode which would allow onload script to run. The point being if you wanted to in theory you could run and api edit call, then redirect the user to the page in edit mode, pause and then redirect the user somewhere else. This would in theory allow an edit, then an onload script to run and then trigger a save.