Hi There,
I've been following this topic to try and get global javascript working:
https://community.plumsail.com/t/is-it-possible-to-store-plumsail-javascript-functions-in-an-external-file/10100
I'm using Sharepoint forms and in my test I'm overriding the EditForm.aspx and opening the form full page by browsing to editform.aspx?id=# directly.
I've got the following code in my form:
fd.created(function(){
var imported = document.createElement('script');
imported.src = '/sites/Testing/Sources/Scripts/globals.js';
document.head.appendChild(imported);
});
and my test script contains a simple function:
function sayHello()
{
alert("hello!");
}
but I'm getting the error:
ReferenceError: sayHello is not defined
at eval (eval at e._executeCustomJavaScript (spform.js:116:105460), :20:5)
at spform.js:45:23858
at Array.map ()
at Function.e.safeRun (spform.js:45:23836)
at t. (spform.js:126:34213)
at spform.js:126:25498
at Object.next (spform.js:126:25603)
at a (spform.js:126:24343)