1

my return type of the following code is returning null even when my code is deployed as web app,

ScriptApp.getService().getUrl();

I was trying to link multiple HTML in my google script based application, and I followed this link

for doing this, however when I checked my return type in the below code, it was retuning null

function getScriptUrl() {
 var url = ScriptApp.getService().getUrl();
 Logger.log(url);
 return url;
}

According to the documentation mentioned here, it should return null only if my code is not deployed, but my code is already deployed and I deployed it from Publish>Deploy as web App, I also check the deployment by changing the version but nothing is working out for me.

Sanat
  • 267
  • 1
  • 5
  • 16
  • that was my initial step, when the code was not working for me, I figured out this issue, here Logger should return the script URL – Sanat Apr 21 '19 at 10:42
  • 3
    Not able to reproduce your issue. Do you have "This Project is published" at the bottom of the script editor? – TheMaster Apr 21 '19 at 11:25

0 Answers0