Examples of using Starfish Class Functions In Javascript: Difference between revisions

From Starfish ETL
Jump to navigation Jump to search
(Created page with "This code was used to lookup a value inside of SugarCRM using the Sugar REST connector. <source lang="javascript"> function scriptedField() { var res = ""; res = vals["Branc...")
 
No edit summary
(One intermediate revision by the same user not shown)
Line 4: Line 4:
var res = "";
var res = "";
res = vals["Branch Name"];
res = vals["Branch Name"];
if (res) {
Starfish.LogMessage(res.toString());
}
res = SmartLookup("TA6_Branch","id","[{\"name\":\"" + res + "\"}]");
res = SmartLookup("TA6_Branch","id","[{\"name\":\"" + res + "\"}]");
return res;
return res;
}
}
</source>
</source>

Revision as of 00:35, 17 November 2018

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;
}