How to send API_GetRecordInfo response elsewhere

  • 0
  • 1
  • Question
  • Updated 4 months ago
  • In Progress
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


Photo of Jordan

Jordan

  • 1,644 Points 1k badge 2x thumb

Posted 4 months ago

  • 0
  • 1
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