title: Change drop-down choice value on SharePoint column using JavaScript
body: <p>I've been assigned to work from a popup (activated from a button on a Sharepoint page/"dashboard") window which opens a new form from a SharePoint list. This is what the pop up looks like.</p>
  
  <p><a href="https://i.stack.imgur.com/mzDWQ.png" rel="nofollow noreferrer">SharePoint New Form for Event XYZ</a></p>
  
  <p>Note: The Promo Item, Quantity Purchased, Event, and Delete (<em>the flag!!!</em>) are all modified using the SharePoint new form. These inputs are all in their own columns in a SharePoint list (looking at another perspective). When the item is saved, this happens:</p>
  
  <p><a href="https://i.stack.imgur.com/TEOsM.png" rel="nofollow noreferrer">Saved Toy for Event XYZ</a></p>
  
  <p>Note: When the toy item is saved/created after SAVE, it's saved to another SharePoint list for record keeping.</p>
  
  <p>Now, please pay attention to the Delete button. When the toy item is created, the Delete flag is defaulted to NO. <strong>Objective:</strong> I want to click the delete button and change the Sharepoint choice values from NO to YES. So far, I have created this code so far (it does not work): </p>
  
  <pre><code>function deleteGuestName(parent, parentID){
      var clientContext = new SP.ClientContext.get_current();
      var oList = clientContext.get_web().get_lists().getByTitle('Toy Order List'); //SP list name 
  
          this.oListItem = oList.getItemById(listID); 
          this.oListItem = oList.set_item("Delete","Yes"); //I thought this would change the choice field
          oList.update();
          oListItem.deleteObject();
  
          clientContext.executeQueryAsync(
              Function.createDelegate(this, this.onQuerySucceeded),
              Function.createDelegate(this, this.onQueryFailed)
          )
  }
  
  function onQuerySucceeded() {
  refreshGrid();
      parent.closeHSPopup();
  }
  
  function onQueryFailed(sender, args) {
      alert('Request failed. ' + args.get_message() +
                  '\n' + args.get_stackTrace());
  }
  </code></pre>
  
  <p>Any help on this is appreciated. I will be happy to clarify if needed. thnxx</p>