Undefined value returned by directmethod on client side

  1. #1

    Undefined value returned by directmethod on client side

    I got this method on server side:

    [DirectMethod]
            public static bool IsTerminalServiceRole()
            {
                return Facade.UserIsInRole(Constants.ROLTERMINALSERVICE);
            }
    It will returns true or false.

    this is the client function that calls the server method

    function verifyConciliation() {
                var result = Ext.net.DirectMethods.IsTerminalServiceRole();
                if (result) {
                    Ext.net.DirectMethods.VerifyConciliationRequest(1);
                } else {
                    Ext.net.DirectMethods.VerifyConciliationRequest(0);
                }
                    setTimeout(verifyConciliation, 60000);
                
            }
    but when debuging result the value its "undefined".

    Any ideas please?
    Last edited by Daniil; Jun 28, 2011 at 10:18 PM. Reason: Please use [CODE] tags
  2. #2
    Hi,

    Please use the "success" handler of DirectMethod.
    Ext.net.DirectMethods.SomeDirectMethod({ 
        success : function (result) {
            alert(result);
        }
    });

Similar Threads

  1. Replies: 3
    Last Post: Dec 26, 2011, 1:32 PM
  2. [CLOSED] Dynamic Store: undefined error at client side
    By digitek in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Nov 16, 2011, 10:17 AM
  3. Replies: 2
    Last Post: Mar 28, 2011, 9:20 AM
  4. [CLOSED] Wait for DirectMethod to execute client side...
    By tjbishop in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 17, 2010, 10:29 PM
  5. Replies: 0
    Last Post: Sep 17, 2009, 8:04 AM

Tags for this Thread

Posting Permissions