title: Google Appscript - function could not be found
body: <p>I have a simple spreadsheet bound script as below</p>
  
  <pre><code>var document = SpreadsheetApp.getActive()
  
  function onOpen() {
  
    var menuEntries = [];
    menuEntries.push({name:'Archive',functionName:'startArchive'})
    document.addMenu("Custom", menuEntries)
  }
  
  function startArchive() {
  
    Logger.log("Will Start Archive")
  
  }
  </code></pre>
  
  <p>All the script is bound to the spreadsheet.</p>
  
  <p>When I reload the spreadsheet, I can see the custom dialog menu with "Archive" as it's drop-down. When I click on Archive, instead of calling "startArchive()" function, I am getting error as</p>
  
  <pre><code>script function startArchive could not be found
  </code></pre>
  
  <p>I have searched on similar issue but users are facing issues like this when they want to call a function from a library but not within the bound script.</p>
  
  <p>I am not able to figure out why I am getting not found error for this simple function.</p>
  
  <p>thank you</p>