Michael Scott
09/15/2021, 8:19 PMi have a client script in a suitelet and I need to execute a function from that Client script once the form has been loaded. I have added my custom function to the CS like this:
return {
showMessage: showMessage
}
and code in my suitelet with an INLINE HTML like this:
form.addField({
id: "custpage_js",
type: serverWidget.FieldType.INLINEHTML,
label: " "
}).defaultValue = ´<script>window.addEventListener('load', function(){ showMessage()}) </script>´
the js code works but the showMessage funtion cannot be found. Any suggestion?Nicholas Penree
09/15/2021, 8:42 PMMichael Scott
09/15/2021, 8:44 PMNicholas Penree
09/15/2021, 8:44 PMMichael Scott
09/15/2021, 8:45 PMMichael Scott
09/15/2021, 8:45 PMNicholas Penree
09/15/2021, 8:45 PMreptar
09/16/2021, 1:42 PM