I've created a "SuiteLet" (actually just a class that take an nlobjForm and adds controls) and I'm having some trouble running it in a BeforeLoad UE script.
Here is the scenario: I want to display the same SuiteLet ("Address View") on my customized Customer form as well as in a totally different, pure SuiteLet ("Assessment View") form.
This is working just find, in the Customer UE BeforeLoad event I pass the nlobjForm instance to the AddressView class and it builds itself on a new tab. In the AssessmentView SuiteLet I create the nlobjForm instance in the main Run() method then pass it to the AddressView class so it can build itself up. This works great and I was really happy with it.
Then I got to stage #2 when I needed to add client functionality to my AddressView SuiteLet. I created a Record Level Client script with no deployments. I already have a Record Level Client script deployed to the Customer record for common functionality unrelated to any SuiteLets. In the AddressView SuiteLet I called nlobjForm.setScript() with the id of my "deployless" AddressView Client script.
When I edit the Customer record it appears that the Client script set with nlobjForm.setScript is not wired up correctly.
Using FireBug I set a breakpoint in the DEPLOYED Record Level client script and accessed the calling method (nlapiFieldChanged) and inspected the locals.... turns out there is only one client script registered.
So, my problem is I have a Record Level client script deployed to the Customer record and then I set another client script from my SuiteLet. The SuiteLet assigned script doesn't seem to be hooked up.
Reading the help I have seen a few things that make me think that indeed multiple client scripts is entirely legal:
Note: You can deploy up to five record-level Client SuiteScripts to any record types that are already supported in the existing form-based model.
andsetScript(script)
Sets the script file(s) used for this form
Anyone doing something similar with success??I DO NOT want to move my AddressView client code into the Record Level deployed script. Things are messy enough because we can't define multiple files....