Launch Google Form via Appscript as a Custom menu

//I am trying to launch a Google form I created from a Google Sheet via App Script. The script does not work and I am not sure what needs to be done to fix it. Here is the script:


function onOpen() {
    var ui = SpreadsheetApp.getUi();
  // Or DocumentApp or FormApp.
    ui.createMenu('Custom Menu')
      .addItem('Edit/Delete', 'menuItem1')
      .addSeparator()
      .addItem('New Entry', 'menuItem2')
      .addToUi();
    }

function menuItem1() {
    SpreadsheetApp.getUi () // Or DocumentApp or FormApp.
     .alert('You clicked the first menu item!');
    }

function menuItem2() {
// Open a fom.     var form =  FormApp.openByUrl('https://docs.google.com/forms/d/e/1FAIpQLSfYrw3nwiYt6p8bPEqyV0GD8hpnaFOfa1i4LHYMo01GPPM6dQ/viewform');
     }