I am developing a small Google Workspace Add on for a customer.
The way I am doing this is by developing it on a different Google Workspace and after testing, I copy it to the customer Google Workspace. However I encounter that there are some differences between those Google Workspaces because I got an error on the customer Workspace when using the Add on. The following piece of code worked on my Google Workspace:
if(e.commonEventObject.formInputs && e.commonEventObject.formInputs.input){
userSpeficiedIdentifier = e.commonEventObject.formInputs.input.stringInputs.value[0];
}
However I received the following error on the customers Workspace:
TypeError: Can not read "value" of undefined.
I was able to fix it on the customer side by adding [""]
after input like this:
if(e.commonEventObject.formInputs && e.commonEventObject.formInputs.input){
userSpeficiedIdentifier = e.commonEventObject.formInputs.input[""].stringInputs.value[0];
}
But this leaves me with some questions I can not answer:
- What exactly is the difference between the customer and my Google Workspace?
- How can I check before hand if such different in version exist and if there any compatibility issues?