define(["./account.js"], function (account) {
 
  function OnStartup (bezl) {        
      // Load the object for the selected customer from local storage into
      // a variable we can work with
      if (typeof(Storage) !== "undefined" && localStorage.getItem("selectedAccount")) {
          bezl.vars.selectedAccount = JSON.parse(localStorage.getItem("selectedAccount"));

          // Perform additional processing on the returned data
          for (var i = 0; i < bezl.vars.selectedAccount.CRMCalls.length; i++) {
            bezl.vars.selectedAccount.CRMCalls[i].show = true;
          }
      }

      // Also pull in the list of defined CRM call types.  This is expecting a plugin instance
      // to be defined in BRDB named sales-rep-calltypes which points to a data source for call
      // types
      bezl.dataService.add('CallTypes','brdb','sales-rep-queries','ExecuteQuery', { "QueryName": "GetCallTypes" },0);

      $(".panel").on("selectAccount", function(event, param1) {
        bezl.vars.selectedAccount = param1;
        bezl.vars.loadedMore = false;

        // If there are no CRM calls present with what was passed over, go
        // ahead and run the full query now
        if (!bezl.vars.selectedAccount.CRMCalls) {
          account.runQuery('CRMCalls');
        } else {
          // Perform additional processing on the returned data
          for (var i = 0; i < bezl.vars.selectedAccount.CRMCalls.length; i++) {
            bezl.vars.selectedAccount.CRMCalls[i].show = true;
          }
        }

      });

      // Prepopulate the CRM new interaction form for click to call/email/navigate
      // Should pass data in param1 in the form of:
      // {
      //   "type": <enum: "phone", "email", "navigate">,
      //   "shortSummary": <string>,
      //   "details": <string>
      // }
      $(".panel").on("CRMNewInteraction", function(event, param1) {
        // TODO: look up an appropriate type from the CallTypes list
        // This should eventually be a config option to select the local
        // CallType to be used for phone/email/navigate. For now we will use
        // some much less useful default strings.
        switch (param1.type) {
            case "phone":
                bezl.vars.type = "Sales";
                break;
            case "email":
                bezl.vars.type = "Email";
                break;
            case "navigate":
                bezl.vars.type = "Customer Visit";
                break;
        }

        bezl.vars.shortSummary = param1.shortSummary;
        bezl.vars.details = param1.details;
      });
  }
  
  return {
    onStartup: OnStartup
  }
});

@@ -1524,24 +1524,137 @@
 %0A        %7D%0A%0A
+        $(bezl.container.nativeElement).find('#filterString')%5B0%5D.value = %22%22; // Clear out the search filter box%0A%0A
       %7D);%0A%0A 

Clear out the filter search box when selecting a new account.