If I call refresh() on my spreadsheet object, any cells that uses custom functions will display as #NAME, when they were previously working. I can add the functions back using addCustomFunction() and it works again. Is that the intended behavior?
Also, how can I cause the entire spreadsheet recalculate itself? One of my custom functions references external data that impacts the function result value. If that external data changes, I need the spreadsheet to recalculate any cells that use the custom function. This is why I was calling refresh(). Is there a better way?