Reputation: 521
I've taken over from another Dynamics CRM developer and noticed that they have a JS script file as a form library. They have then registered multiple functions from the script library with the Form's OnLoad event using the Form Properties window. The same could have been achieved by calling an onLoad function in the script file and calling those other functions inside the onLoad function. They both are the same but I wanted to know if anyone can think of reasons why one method is better than the other or viceversa?
Thanks.
Upvotes: 0
Views: 2399
Reputation: 17562
This is a subjective decision, I'm not sure one is really better than the other.
Having a single on load function that calls all other functions has a nice simplicity, and enables control via code.
Registering the functions individually has a few additional benefits:
Upvotes: 0