Skip to content

Instantly share code, notes, and snippets.

@MappingKat
Last active November 17, 2019 00:34
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MappingKat/1466aad3f70f8d9a0804b0b2f4fd0c8c to your computer and use it in GitHub Desktop.
Save MappingKat/1466aad3f70f8d9a0804b0b2f4fd0c8c to your computer and use it in GitHub Desktop.
function updateStatus (recordID) {
var url = "https://api.fulcrumapp.com/api/v2/records/" + recordID + ".json?token=" + fulcrumAPIkey;
var options = {
"method": "GET",
"contentType": "application/json"
};
var recordJSON = UrlFetchApp.fetch(url, options);
// Update record with status info
var record = JSON.parse(recordJSON);
record.record.status = "Needs A Re-Visit";
// PUT updated record to Fulcrum
var url = "https://api.fulcrumapp.com/api/v2/records/" + recordID + ".json?token=" + fulcrumAPIkey;
var options = {
"method": "PUT",
"contentType": "application/json",
"payload": JSON.stringify(record)
};
var recordJSON = UrlFetchApp.fetch(url, options);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment