BrittanyScheid
4 years agoQrew Cadet
Re: Formula URL button - save and redirect
Thank Sharon. I tried this, but it's still just sending me back to the same page after it goes to the code page. I tried sending it to the form that I want and also just to the app home page and neither worked. Both times it just went back to the same edit form screen. Any thoughts? Below is the code from the formula-URL field. I used the code directly from the code page Body on this page without any changes.
------------------------------
Brittany Scheid
Special Projects Manager
SimiTree
------------------------------
var text rid =
If([Record ID#]>0,
ToText([Record ID#]), // Record ID already exists
"%%rid%%" // New record, no Record ID exists yet
)
;
// API URL to Add/Edit/etc.
var text urlToExecute = URLRoot() & "db/" & Dbid() & "?a=er&dfid=12&rid=" & $rid;
//& Dbid() & "?a=er&dfid=12&rid=" & $rid;
URLRoot() & "db/" & AppID() & "?a=dbpage&pageid=4" // Open code page 4
& "&url=" & urlencode($urlToExecute) // Pass in the URL to execute
------------------------------
Brittany Scheid
Special Projects Manager
SimiTree
------------------------------