I am trying to make a Google App with multiple view pages in it. For mye private account i have been using ScriptApp.getService().getUrl() and it works just fine.
However, I am making a app for my business and when I use the Google business account it does not work.
When I use ScriptApp.getService().getUrl() it returns a URL without the business name in it.
The function does not work due to the presence of the name of my company in the url (ex: script.google.com/a/companyName.com/macros/s/ID/dev?v=form).
And with the function geturl(), i return the url without the name company in the url (ex: script.google.com/macros/s/ID/dev?v=form)
I tried wokring around this problem constructing my own url with the split function like this: screenshot from script
However when i click on the hyperlink the url changes and there is added url to my own constructed url.
This url is added to the start: https://n-5u3nlbkbkn77idrtc7rsuioirbuz5av43zzl23y-1lu-script.googleusercontent.com/
Which results in a long url that gives an error: https://n-5u3nlbkbkn77idrtc7rsuioirbuz5av43zzl23y-1lu-script.googleusercontent.com/script.google.com/a/macros/nhhs.no/s/AKfycbx3NRBmy8z1-Yiz6nH-el2zO7hQl6oIEgetvSHvWVM/dev?=Item
As you can see my constracted url is at the end.
Is there anyone else that have the same problem or know how to work around it?