Forum Discussion
------------------------------
Laura Thacker (IDS)
laura@intelligentdbs.com
(626) 771 0454
------------------------------
- IvanWeiss6 years agoQrew Captain
Sums up my day! Forgot to paste in the formula!
//Button Functionality:
//Change the stage of the opportunity to won and set the Date Won to Today. This triggers automation.
//Redirect back to the same form to display the record with updates.
//**************************************************************************************************************
//Define button style
var text CLASS = If([Stage]="Won","btn btn-success btn -sm","btn btn-default btn -sm");
var text FONTCOLOR = If([Stage]="Won", "#FFFFFF", "#A9A9A9");
var text LABEL = "Won";
//Change the stage of the opportunity to won and set the date won to today.
var text URLONE = URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" &
"&rid=" & [Record ID#] &
"&apptoken=c5gchf9bhwx6umbd2ii5zdqtb5x8" &
"&_fid_9=Won" &
"&_fid_23=" & URLEncode(Today()) &
"&rdr=" & URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Record ID#];
"<a class='" & $CLASS & "' style='color: " & $FONTCOLOR & "; text-decoration: none'" & "href='" & $URLONE & "'" & ">" & $LABEL & "</a>"
Ivan J. Weiss, CFSP | Executive Vice President & COO | elite|studio e
631.949.6635 | www.elitestudioe.com
Connect with us. LinkedIn | Instagram
------Original Message------
Post your formula; it's likely a syntax error.
------------------------------
Laura Thacker (IDS)
laura@intelligentdbs.com
(626) 771 0454
------------------------------- Laura_Thacker6 years agoQrew Commander
URLRoot() & "db/" & Dbid() & "?a=API_EditRecord&apptoken=c5gchf9bhwx6umbd2ii5zdqtb5x8&rid=" & [Record ID#] & "&_fid_9=" & URLEncode("Won") & "&_fid_23=" & URLEncode(Today()) & "&rdr=" & URLEncode( URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Record ID#])
------------------------------
Laura Thacker (IDS)
laura@intelligentdbs.com
(626) 771 0454
------------------------------
- IvanWeiss6 years agoQrew Captain
Thanks! That did it. Those URL Encodes still get me, I cant figure out the consistent rules to them
Ivan J. Weiss, CFSP | Executive Vice President & COO | elite|studio e
631.949.6635 | www.elitestudioe.com
Connect with us. LinkedIn | Instagram
------Original Message------
Post your formula; it's likely a syntax error.
------------------------------
Laura Thacker (IDS)
laura@intelligentdbs.com
(626) 771 0454
------------------------------- Laura_Thacker6 years agoQrew CommanderStrongly recommend the Magic Buttons application in the Exchange - this will give you huge insights to formatting of formulas; especially when the Quick Base format is new to you.
Remember on redirects you have to URLEncode() the redirect location otherwise the formula doesn't know what to do after the initial API action.
------------------------------
Laura Thacker (IDS)
laura@intelligentdbs.com
(626) 771 0454
------------------------------- MarkShnier__You6 years ago
Qrew Legend
Ivan
When you have successive URL API calls, this would be the generic Syntax. you just slice as much off the salami as you need.
$URLONE
& "&rdr=" & URLEncode($URLTWO)
& URLEncode("&rdr=" & URLEncode($URLTHREE))
& URLEncode(URLEncode("&rdr=" & URLEncode($URLFOUR)))
so in your case it is 2 slices so, .....
$URLONE
& "&rdr=" & URLEncode($URLTWO)
------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
markshnier2@gmail.com
------------------------------