Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions functions/updateDetails
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
function updateDetails(e) {
// Prevent errors if no object is passed.
if (!e) return;
// Get the active sheet.
e.source.getActiveSheet()
// Set the cell you want to update with the date.
.getRange('M2')
// Update the date.
.setValue(new Date());
// Get the active sheet.
e.source.getActiveSheet()
// Set the cell you want to update with the user.
.getRange('M3')
// Update the user (only email is available, and only if security settings allow).
.setValue(e.user.getEmail() );
}