Reputation: 1832
Is there a way to construct a local link with parameters that will work in both test and prod? I was planning to hard code it but realized the first part of the link being different would cause problems. (yes, I can create a script variable but that isn't ideal).
By this I mean links that end with #Files?id=100
Upvotes: 0
Views: 43
Reputation: 5253
Yes there is! You need to use this on the server script:
var appUrl = ScriptApp.getService().getUrl();
appUrl += "#Files?id=100;
Reference: https://developers.google.com/apps-script/reference/script/service#getUrl()
Upvotes: 1