title: Trigger onEdit(e) does not trigger
body: <p>When I've tried just to <code>setValue("random")</code> to some cell with this trigger it does work, but when I've tried to execute this code(for returning certain sheet names from selected spreadsheet) it doesn't work! When I run that chunk of code as separate function it does work and return sheets normally.</p>
  
  <p>So, why it doesn't execute part of code from "//RETURNING JUST BUILDING LIST" part when I change value in D2 cell?    </p>
  
  <pre><code>function onEdit(e) {
  
  var range = e.range;
  var rangeEdit = e.range.getA1Notation();
  
  if(rangeEdit == "D2"){
  
  //RETURNING JUST BUILDING LIST  
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  
  ss.getSheetsByName("OVERVIEW").getRange('A2').setValue("OK")
  
  var sRNG = ss.getSheetByName("KEYS").getRange('A1:A12').getValues();
  
  for (var z=0; z&lt;sRNG.length; z++)
    if (sRNG[z][0] == ss.getSheetByName("OVERVIEW").getRange('G3').getValue()) {
    var xyz = z + 1;
    }
  
   var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
   var range = ss.getSheetByName("OVERVIEW").getRange(1, 8, 50, 1); 
   range.clear();
  
  var shArray = [];
  var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
  
  var spreadSheetsInA = 
  SpreadsheetApp.openByUrl(ss.getSheetByName("KEYS").getRange('B' + xyz).getValue()).getSheets();
  
  shArray = spreadSheetsInA.map(function(sheet) {
  return [sheet.getName()];
  });
  
  var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
  var range = ss.getSheetByName("OVERVIEW").getRange(1, 8, shArray.length, 1);
  range.setValues(shArray);
  
  var rDEL = 1
  for (var xdel = 0; xdel&lt;shArray.length; xdel++){
  if(shArray[xdel][0].indexOf("Overview")&gt;-1 | shArray[xdel][0].indexOf("Cashflow")&gt;-1 | shArray[xdel][0].indexOf("Dates")&gt;-1){
  var delSHT = ss.getSheetByName("OVERVIEW");
  delSHT.getRange('H' + rDEL).clear();
  
  }
  rDEL++
  }  
  }
  }
  </code></pre>
  
  <p>Even when I've tried this, it doesn't work...</p>
  
  <pre><code>function onEdit(e) {
  
    var range = e.range;
    var rangeEdit = e.range.getA1Notation();
    if(rangeEdit == "D2"){
    var ss = SpreadsheetApp.getActiveSpreadsheet();
    ss.getSheetsByName("OVERVIEW").getRange("A2").setValue("ok")
  }
  }
  </code></pre>
  
  <p>Basically, I just need to execute code if value in D2 in sheet Overview is changed! </p>