Forum Discussion

JanaBaker's avatar
JanaBaker
Qrew Cadet
6 years ago

Save and redirect back to a report

Hey everyone!!  I am trying to create my own "Save and Redirect" button.  This button will live on Form 16 of the [_DBID_LEADERS2]  table and ultimately take me to Report 27 after the SAVE.  (and yeeeesssss...i know...QB doesnt support us creating our own Save Buttons) :-)

Below is what I have written so far (borrowed from Kelly...thank you!!).  What I haven't been able to piece together is "URLSEVENChangeLeaders" and onclick='DoSaveAdd() to create the Save/Redirect part i'm looking for.  

***URLFOUR is also currently not working right either...it was also a failed attempt at a "save/redirect" button.  It is supposed to "update what is on form 16 and take me to the Change Leaders report as well.  No worky!!  HELP!!


// Begin button style
var text ViewOnFormSixteen = URLRoot()  & "db/" & Dbid() & "?a=q&qid=27&nv=1&v0=" & [Record ID#];
var text bgcolor = "#008522";
var text txtcolor = "white";
var text bgcolorstylethree = "#304cb2";
var text txtcolorstylethree = "white";
var text URLONE = URLRoot() & "db/" & Dbid() & "?a=er&dfid=16&rid=" & [Record ID#];
var text URLFIVEValidatePayPeriod = URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & ToText([Record ID#]) & "&dfid=18";
var text URLSEVENChangeLeaders = URLRoot()  & "db/" & [_DBID_LEADERS2] & "?a=q&qid=27&nv=1&v0=" & [Record ID#];
var text URLFOUR = $URLONE & "&NextURL=" & URLEncode($ViewOnFormSixteen);

var text style = "style=\"width: 175px;  line-height: 1.5; text-align: center;  text-decoration: none; background:" & $bgcolor & "; border-radius: 5px; padding: 10px; margin: auto;  font-weight: normal; font-size: 12px; text-align: center; display: inline-block; color: " & $txtcolor & "; font: normal 700 24px/1 \"Calibri\", sans-serif;";

var text stylethree = "style=\"width: 175px;  line-height: 1.5; text-align: center; text-decoration: none; background:" & $bgcolorstylethree & "; border-radius: 5px; padding: 10px; margin: auto;  font-weight: normal; font-size: 12px; text-align: center; display: inline-block; color: " & $txtcolorstylethree & "; font: normal 700 24px/1 \"Calibri\", sans-serif;";


"<div>" &
//"<a " & $style & " href='" & $URLFOUR &"'>Not working</a>" & "&nbsp;&nbsp;" &
"<a " & $stylethree & " href='" & $URLFIVEValidatePayPeriod &"'>Validate Pay Periods</a>" & "&nbsp;&nbsp;" &
"<a " & $stylethree & " href='" & $URLSEVENChangeLeaders &"'>Change Leader Report</a>" & "&nbsp;&nbsp;" &
"<a " & $style & " onclick='DoSaveAdd()'href='#'>Save Changes Here</a>" & "&nbsp;&nbsp;"

Thank you anyone/everyone who can help me!!  

3 Replies