Basically question.
I tried this piece of code but It just returns: TypeError: quoteName.getId is not a function
quoteTemp = SpreadsheetApp.getActiveSpreadsheet();
var projectName = sheet.getRange('C10').getValue().toString();
projectName = projectName.replace('Project: ', '-');
var quoteName = companyName projectName '-' finalCode;
quoteTemp.copy(quoteName);
var sheetId = quoteName.getId();
SpreadsheetApp.openById(sheetId)
SpreadsheetApp.setActiveSpreadsheet(quoteName)
Logger.log(sheetId);
CodePudding user response:
As a guess. Try to change the line:
quoteTemp.copy(quoteName);
To:
quoteName = quoteTemp.copy(quoteName);