This code was used to lookup a value inside of SugarCRM using the Sugar REST connector.
function scriptedField() {
var res = "";
res = vals["Branch Name"];
if (res) {
Starfish.LogMessage(res.toString());
}
res = SmartLookup("TA6_Branch","id","[{\"name\":\"" + res + "\"}]");
return res;
}