07-17-2014 11:09 AM
var json = remote.call("/imaging/document/parentdoc");
if (json.status == 200) {
//Do stuff
} else {
logger.log("Error …..");
//Manage error code
json.status.message // here i want the backend message but empty :-(
}
// business code
if (contentNode.typeShort == "fds:content") {
//business code
} else {
status.code = 400;
status.message = "Bad request : node is not a content !";
status.redirect = true;
}
json.status.message // it returns empty string
json.status.redirect // return false where it should be true
json.status.code // return correct response code like 'json.status'
07-18-2014 03:32 AM
var json = remote.call("/imaging/boxes/admin");
obj = eval("(" + json + ")");
if (json.status == 200) {
model.result = obj;
} else {
status.code = 500;
status.message = obj.message; //GOT it !
status.redirect = true;
}
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.