0
votes

I'm working on one existing apps script(sheets) app, when user clicks on Save button for the first time it is asking for the authorization which is the expected functionality. But the problem is after authorization the save function is not getting invoked, I need to click it again. So some users are getting confused with this behavior since they are thinking that the data got saved after authorization.

My questions are

  1. Is this the default behavior?
  2. If it is default, how to overcome this case?
  3. Is there any way to execute the function automatically after authorization?

I couldn't paste the code here due to some confidential issues, looking for any links or solutions. Thanks in advance.

1
Apps Script ediotr does not ask you for authorization when you save your code, but only when you run it. If this is not what you mean, please provide more details - are you talking about a bound script attached to a document you share with other users? An Addon? A custom function? Please also provide a sample code leading to this behavior. - ziganotschka
I was referring Save button but not the code save (updated my question). SaveRecord() is my custom function that gets invoked on the button click. The save button click for the first time is asking for the authorization. Code inside the function is just copying the current sheet data to new sheet. Due to the confidentiality I couldn't share the code here. - Srikanth

1 Answers

0
votes

The behavior you report actually seems to be a bug.

It has already been reported on Google's Public Issue Tracker and seems to being worked on.

Unfortunately I cannot think of another workaround than informing your users about the current situation.

I can only recommend you "star" the issue to increase the visibility for its importance and get updates about its fixing status.