Forum Discussion
DavidBrogdon
7 years agoQrew Assistant Captain
Just figured I would add code for how to pull values into the code page from a URL button within QB. Just replace "rid" with the name of your parameter name.
<script>
function getUrlParameters() {
var params = {};
var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
params[key] = value;
});
return params; }
function doCode(){
var recordID=getUrlParameters() ["rid"];
alert(recordID);
}
</script>
DavidBrogdon
7 years agoQrew Assistant Captain
This is one way to make further API calls after processing data on code page -->
var request = new XMLHttpRequest();
request.open('POST', 'https://yourdomain.quickbase.com/db/yourtable?a=API_yourAPIcall&apptoken=yourapptoken', true);
request.onload = function () {
alert("record added");