w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Google Apps Script - Error: script function not found when library used

This is the wanted comportment for google apps script library:
That's designed to make private functions.


as it say in the documentation:

If you want one or more methods of your script to not be visible (nor usable) to your library users, you can end the name of the method with an underscore. For example, myPrivateMethod_()

As "library function", function buildForm() can call function getLabelText_() that is also in that library. But you can't call directly function getLabelText_() from the script using the library. Neither your script has the right to call directly function clickHere_(e).
So when used as server handler the function clickHere_(e) is called from the script not from the library, and it won't work. To call this function you should remove the "_" at the end of it and call it this way: libraryName.libraryFunction();

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.