I am brand new to Google Script and I am trying to create a Google Sheet to manage the creation of Quotes....I have created a form that will capture the Quote details and I want the user to be able to click on a Menu item at the top of the Sheet to "Create New Quote" which will open the Form.
What command can I use in place of the following when creating the Menu Item so that is will Open the Form....do I need to refer to the Form ID anywhere ?
function onOpen() {
var ui = SpreadsheetApp.getUi();
// Or DocumentApp or FormApp.
ui.createMenu('Quote Generator Menu')
.addItem('Create New Quote', 'menuItem1')
.addItem('Update Lists', 'updateLists')
.addSeparator()
.addSubMenu(ui.createMenu('Reporting')
.addItem('Dashboard', 'menuItem2'))
.addToUi();
}
function menuItem1() {
SpreadsheetApp.getUi() // Or DocumentApp or FormApp.
.alert('You clicked Create New Quote');
}
function menuItem2() {
SpreadsheetApp.getUi() // Or DocumentApp or FormApp.
.alert('You clicked Dashboard');
}