title: How to call a backbone view function from another view in separate files
body: <p>I have two backbone views defined in two separate files namely: 
   LandingView.js</p>
  
  <pre><code>define([
      'jquery',
      'underscore',
      'backbone',
      'marionette',
      'text!templates/landing/landingTemplate.html',
      'text!templates/invitations/invitationsTemplate.html',
      'views/invitations/InvitationsView',
  ], function ($, _, Backbone, Marionette, landingTemplate, invitationsTemplate, InvitationsView) {
  var LandingView = Backbone.View.extend({
          el : $("#landing"),
          id : 'landing',
          transition : 'slide',
  
          initialize : function () {              
              this.GetNotificationsCounts();
          },
          events : {
              'click #invitations' : 'onInvitations',
  
          },
          render : function () { 
              var that = this;
              $('.menu li').removeClass('active');
              $('.menu li a[href="#"]').parent().addClass('active');
  
              this.$el.html(landingTemplate);
  
          },
          cleanup: function() { 
              this.undelegateEvents();
              $(this.el).empty();
          },
          onInvitations : function () { 
  
              //do something
          },
  
          GetProfile: function (userLogin) {
                 // do something
          },
  
  
          GetNotificationsCounts: function () {
                 // do something
  
          },
  
          formatAccountName: function () {
               //do something
          }
  
  
      });
  
  return LandingView; });
  </code></pre>
  
  <p>Then there is another file InvitationsView.js</p>
  
  <pre><code>define([
      'jquery',
      'underscore',
      'backbone',
      'marionette',
      'views/landing/LandingView',
      'text!templates/invitations/invitationsTemplate.html',
  ], function ($, _, Backbone, Marionette, LandingView, invitationsTemplate ) {
  
  
  var InvitationsView = Backbone.View.extend({
          el : $("#invitations"),
          id : 'invitations',
          transition : 'slide',
  
          initialize : function () { debugger;
  
              this.$el.attr('data-transition', this.transition);
              this.currentUserLogin = currentUserLogin;
              var that = this;
  
          },
          events : {
  
          },
          render : function () { debugger;
              $('.menu li').removeClass('active');
              $('.menu li a[href="#"]').parent().addClass('active');
  
              this.GetUserInvitationDetails();
  
               this.$el.html(invitationsTemplate);
  
          },
          cleanup: function() { 
              this.undelegateEvents();
              $(this.el).empty();
          },
  
          GetUserInvitationDetails: function () {
  
              var landingView =  new LandingView();
              currentUserName= landingView.formatAccountName();
              curUser = currentUserName.replace("\\", "^").replace("^", "%5E");
  
              var profilemsg = landingView.GetProfile(currentUserName);
  
          },
  
      });
  
  return InvitationsView;});
  </code></pre>
  
  <p>Now I need to call the formatAccountName and GetProfile functions defined in the first JS to the second JS. I am unable to do that. I get errors. 
  When I try </p>
  
  <blockquote>
    <p>var landingView =  new LandingView();
                    currentUserName= landingView.formatAccountName();</p>
  </blockquote>
  
  <p>This also fails. Can somebody help me in this regard and tell me how can I achieve this</p>