Skip to main content
setComment used to be a method for Class Range, it was replaced by setNote; it's only available for Google Sheets
Link
Wicket
  • 39.4k
  • 9
  • 81
  • 201
edited title
Link
user3717023
user3717023

google apps script: determening Determine current user in Apps Script

Source Link
user1468633
  • 171
  • 1
  • 1
  • 5

google apps script: determening current user

I'm trying to identify current user's name to make notes of who edited what like this:

 r.setComment("Edit at " + (new Date()) + " by " + Session.getActiveUser().getEmail()); 

but it won't work - user's name is an empty string. Where did I go wrong?