RhondaJones
3 years agoQrew Cadet
XML Issue
I am creating a button to change a status field. I am getting the XML style information issue. The button works correctly and I know it has something to do with the code not redirecting back to the r...
So, believe it or not you are very close and this is not an error. Granted it's not a great user experience.
Whenever you call an API you then need to follow that up with landing the user on a record or a report or some kind of home page or Dashboard . If you don't do that the API feels compelled to spew it's response back to the user on the screen. In this case it is saying "good news you have no error".
So, here is alternative code to refresh the page the user was on when they pushed the button.
var text Edit = URLRoot() & "db/bsy9zg874?a=API_EditRecord&rid=" & [Record ID#] & "&_fid_330=" & URLEncode("Review for Inspection");
var text RefreshPage = URLRoot() & "db/" & Dbid() & "?a=doredirect&z=" & Rurl();
var text URL = $Edit
& "&rdr=" & URLEncode($RefreshPage);
var text Image = "<img src='https://expertclaimmanagement.quickbase.com/up/bjvfbr5ux/g/rbh/eg/va/button_rev-for-insp.png'>";
"<a href='" & $URL & ">" & $Image & "</a>"
I thought it was something to do with that! Thank you.
Using that code, however, my button is gone (doesn't display) lol
any thoughts
Maybe try removing the single quotes like this
var text Image = "<img src=https://expertclaimmanagement.quickbase.com/up/bjvfbr5ux/g/rbh/eg/va/button_rev-for-insp.png>";
"<a href=" & $URL & ">" & $Image & "</a>"
Perfect! Thanks a billion!