<@U29PVMVAR> You used the pageInit as an entry poi...
# suitescript
w
@erictgrubaugh You used the pageInit as an entry point so it would load the script even though you had a separate function to handle the click. I think that's what I was looking for. Thanks
e
Yeah depending on how the Client Script is attached to the form, sometimes you need an empty entry point
I typically use
pageInit
as its only called once; but you could theoretically use any entry point
I think if you are doing
context.form.clientScriptModulePath = "blah.js";
in your UE, then you don't need the empty entryp oint
but if you have a proper Script record, then you will
w
@erictgrubaugh I'm using Eclipse and it won't let me upload the CS unless I have the entrypoint. Same as if I try to manually upload it. I'll keep messing around with it.
e
Yeah so you have a proper Script record then, and you need an empty entry point
w
Do I actually need the context.form.clientScriptModulePath in my UE script? I tried without and it didn't seem to work.
Also are context and scriptContext the same thing?
e
it's however you name the entry point argument
I like
context
because it's shorter