Forum Discussion

JordanBeatty1's avatar
JordanBeatty1
Qrew Captain
6 years ago

How to send API_GetRecordInfo response elsewhere

I run this script on the record 

var dbid = "xxxxxx";
console.log(kRid);
 
var promise = $.post(dbid, {
  act: "API_GetRecordInfo",
  rid: kRid,
});
$.when(promise).then(function(xml) {
  console.dirxml(xml);
  console.log($("errcode", response).text());
});
And it is returning an XML document containing all the fields and their values for the record as predicted. Though, now I would like to send the retrieved XML document else where. Is their a best way to do this within Quickbase? I am not totally sure on how to do this. All I have been given currently is a URL of where to send it to, and googling hasn't gotten me very far yet


1 Reply

  • When you say send it elsewhere - is this another system? Or are you sending it elsewhere in Quick Base?

    If you have the XML response, you should start with parsing out the response values you want so you can send only the key info, unless you actually want to send the entire XML response which is large.

    From there, you will need to make another API call to that system to log the response. For example - if you were sending this record to another location in Quick Base - you might do your API_GetRecord call - then chain an API_AddRecord POST or GET and add a record in another table. If you are sending it to another system, Salesforce for example, you would need to read the Salesforce API and make an API call to that system, sending it information you've parsed out of the Quick Base GetRecordInfo via the appropriate API method of that system. 

    In both scenarios - to do something with the response you get, you'll need to make another API call to send it where you want it

    Chayce Duncan | Technical Lead
    (720) 739-1406 | chayceduncan@quandarycg.com
    Quandary Knowledge Base