I got this working with a couple of adjustments and removing my $style variable, but now I lose my button esthetics.
// Begin button style
var text bgcolor = "#F1948A";
var text txtcolor = "black";
var text style = "style=\"text-decoration: none; width: 100px; text-align: center; background:" & $bgcolor & "; border-radius: 5px; padding: 5px 0px; color: " & $txtcolor & "; display: inline-block; font: normal 700 28px/1 \"Calibri\", sans-serif; text-shadow: none;";
// End button style
var text rid = If([Record ID#]>0, ToText([Record ID#]), "%%rid%%");
var text url = URLRoot() & "db/" & Dbid() & "?a=er&rid=" & $rid;
//removed & $style - this is working without button style
"<a class= 'SaveBeforeNavigating' data-replaceRid=true href='" &$url &"'>Save & Keep Working - Rich Text</a>"
I just can't get across the finish line.
Thanks, Chuck