I’m working this Google Workspace Add-on app, I’m trying to get a function that sets the appropriate function for calling the document id depending on if it’s called in the context of drive, docs, sheets, etc.
function checkContext(event){
var itemId;
Logger.log(event)
if (DocumentApp.getActiveDocument().getId() != null && DocumentApp.getActiveDocument().getId() != undefined)
{
itemId = DocumentApp.getActiveDocument().getId();
Logger.log(itemId);
}
else if (e.drive.selectedItems[0].id != null && e.drive.selectedItems[0].id != undefined){
var itemId = e.drive.selectedItems[0].id;
Logger.log(itemId);
}
else if (SpreadsheetApp.getActive().getId() != null && SpreadsheetApp.getActive().getId() != undefined){
var itemId = SpreadsheetApp.getActive().getId();
Logger.log(itemId);
}
else {
var itemId = SlidesApp.getActivePresentation().getId();
Logger.log(itemId);
}
As you can see, I’ve attempted to achieve this with a nested if statement, where the itemId
variable is set to the appropriate context depending on which getId() does NOT fail. Despite my best efforts, I always get the
TypeError: Cannot read property ‘getId’ of null
error every time the my function is triggered.
mail order prednisone – buying prednisone mexico order prednisone 10mg
where can i get cytotec to buy
buy clomid nolvadex uk
http://levitraoffer.com levitra tablets 10mg
clomid 200 mg pregnancy
accutane 5 mg – accutane medicine price order accutane online usa
I like what you guys are up too. This type of clever work and coverage!
Keep up the wonderful works guys I’ve incorporated you guys to
my personal blogroll. https://hhydroxychloroquine.com/
I love what you guys are up too. This kind of clever work and reporting!
Keep up the superb works guys I’ve added you guys
to blogroll. http://hydroxychloroquined.online/
advair 250/50
https://levitradd.com/ levitra generic brand
http://winviag.com cheapest viagra 100mg
stromectole online – cost stromectol cheap stromectol
accutane 120 mg – accutane costs canada accutane india pharmacy
http://prescriptionhim.com/ viagra without a doctor prescription
http://kamagramale.com kamagra 100
http://prescriptionhim.com/ viagra prescription
https://himshairloss.com/ propecia price in australia
Wow, awesome weblog format! How lengthy have you ever been running
a blog for? you made blogging glance easy. The full glance
of your site is excellent, as smartly as the content! http://www.deinformedvoters.org/hydroxychloroquine
Do you have any video of that? I’d like to find out some additional information. http://droga5.net/
https://iwermectin.com/ ivermectin tablets for humans
furosemide 80 tablet – buy furosemide online usa furosemide 40 for sale
It’s awesome to pay a quick visit this web site and reading the views of all friends on the topic of
this post, while I am also keen of getting experience. http://antiibioticsland.com/Amoxil.htm
http://ivermectineffects.com/ ivermectin for humans for sale
http://ivermectinovercounter.com/ ivermectina en humanos
how much is propecia at walmart
You need to be a part of a contest for one of the most useful websites online.
I will highly recommend this blog! http://cleckleyfloors.com/
amoxicillin 500mg clavulanic acid 125mg
buy zithromax without presc
zithromax 500 mg
http://ivermectinus.com/ ivermectin over the counter
http://zithrozpack.com/ azithromycin
http://albuterolotc.com/ otc inhaler bronchitis
ivermectin 250ml – ivermec4human stromectol 6 mg dosage
how to purchase dapoxetine
stromectol over the counter https://ivermcov.com/# side effects of ivermectin for humans
dapoxetine hydrochloride for premature ejaculation
how to treat arthritis in neck https://ventolinhfaer.com/ where to buy otc inhalers for asthma without
lisinopril nombre comercial venezuela
dr mercola articles on high blood pressure stromectol over the counter https://iveramectin.com ivermectin tablets over counter
sildenafil prescription nz
first aid at work http://ivermectino.com stromectol
gag gift fake viagra prescription http://viagrob.com does viagra work for women
the prozac nation
advair price us
how to order prednisone online
cialis online canada paypal
buy clomid online with mastercard
buyclomidhereonline
ivermektin eladГі http://ivermectin1.com/ buy stromectol ivermectine
zithromax peds dosing http://azithrozpack.com amoxicillin buy
http://stromectolo.com – ivermectin
Good day very cool website!! Guy .. Excellent ..
Amazing .. I will bookmark your web site and take the feeds additionally?
I am glad to find a lot of useful information here within the submit, we’d like
develop extra techniques on this regard, thanks for
sharing. . . . . . http://herreramedical.org/prednisone
compare sildenafil prices
stromectol pills
lowest price for sildenafil 20 mg
http://ivrmectin.com – stromectol
flomax for women with kidney stones
sildenafil 12.5 mg
where to get viagra
viagra generic
pharmacy online 365
where to buy ivermectrin for humans http://stromectolforte.com/ ivermectin stromectol cost
pharmaceutical online
buy generic viagra with paypal
ivermectin 200
ivermectin 400 mg brands http://stromectolforte.com/# ivermectin tablets for humans ivermectin dosage for humans
[url=https://viagratabx.com/]how to buy viagra no prescription[/url]
clomid pharmacy prices
stromectol sales
levitra online australia
stromectol tablets https://stromectoloff.com/ ivermectin tabs for humans for sale
buy cialis soft tabs online
viagra online europe
150 mg generic viagra
buy molnupiravir tablet
women viagra price
generic cialis 20mg pills
female viagra buy online in india
cialis 5mg online usa
Hmm is anyone else having problems with the pictures on this blog loading?
I’m trying to figure out if its a problem on my end or if it’s
the blog. Any suggestions would be greatly appreciated. http://harmonyhomesltd.com/Ivermectinum-during-pregnancy.html
price for cialis in canada
best price cialis 20 mg
buy prozac online india
viagra generic http://viagwdp.com/ order brand viagra buy viagra without a script
how much is cialis daily
buy viagra online canada paypal
generic prednisone 5mg – generic prednisone deltasone drug
viagra average cost
I am truly delighted to read this webpage posts which consists of lots of
useful information, thanks for providing such information. https://prescriptiondrugswithoutdoctorapproval.com/sildenafil/
order hydroxychloroquine 400mg generic – plaquenil 400mg pill order hydroxychloroquine 200mg pills
prednisone 40mg generic – northwest pharmacy buy prednisone 40mg generic
cost tadalafil generic tadalafil brands
buy cialis pills https://cialiswbtc.com/
tadalafil online tadalafil goodrx
https://cialisedot.com/ tadalafil without a doctor prescription
https://cialisbusd.com/ buy tadalis
ivermectin 12 mg stromectol 12mg online buy stromectol 6 mg
stromectol pharmacy generic stromectol 12mg
stromectol for sale ivermectin canada