dcrsmith
02/28/2019, 4:17 PMerictgrubaugh
02/28/2019, 4:18 PMerictgrubaugh
02/28/2019, 4:22 PMdefine([...], function (...) {
// other stuff
function toButton(applicant) {
/* XXX When this client script is attached via `form.clientScriptModulePath`, the click handler function
* is not exported correctly into the browser global context, so supportApplicant() is undefined. This
* workaround requires the module at runtime as well in order to property invoke supportApplicant()
*/
var onclick = "require([\"" + CLIENT_PATH + "\"], function(mod){mod.supportApplicant(" + applicant.id + ");})";
return [
"<button type='button' id='btn_", applicant.id,
"' onclick='", onclick, ">",
"</button>"
].join("");
}
function supportApplicant(id) {
// awesome click handles
}
exports.supportApplicant = supportApplicant;
return exports;
});
erictgrubaugh
02/28/2019, 4:23 PMtoButton
just ouputs the HTML of the button that I then pass to setSublistValue()
for the Inline HTML fielderictgrubaugh
02/28/2019, 4:23 PMrequire()
mess within the onclick
attributedcrsmith
02/28/2019, 5:21 PMerictgrubaugh
02/28/2019, 5:42 PMerictgrubaugh
02/28/2019, 5:43 PMrequire()
you should still be able to use the /.bundle123/
or whatever that syntax is for SuiteApps, but I've never done it myselfdcrsmith
03/05/2019, 5:39 PM