web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Playing with json-rpc call using sencha touch

(0) ShareShare
ReportReport
Posted on by

Hi,

In an old life :-), i was using jquery-rpc for sending json data such as :

Code:
$(document).ready(function() 
{
    $.jsonRPC.setup({endPoint: '/rpc/abusfake.sh', namespace: 'DmngCoreStub' }).request('getCapabilities', 
    {
	params: {},
	success: function(result)
        {
            //alert("[JSON-RPC] Getting the device capabilities : OK ");
	    console.log("[JSON-RPC] Getting the device capabilities : OK ");
            //alert(_objectIntrospection(myjson));


            if (result.result != null)
            {
		_setJsonToLocalstorage('jsonDmngCapabilities', myConfigJsonResult);
            }
        },
        
        error: function(result)
        {
	    var msg = '';
	    
            //alert("[JSON-RPC] Error message = ".result.error.message);
	    console.log("[JSON-RPC] Error message = ".result.error.message);
	    
            if (result.error.message != null)	msg += result.error.message;
            else				msg += result.error;
	    
            //alert("[JSON-RPC] Getting the device capabilities : NOK (" + msg + ")");
	    console.log("[JSON-RPC] Getting the device capabilities : NOK (" + msg + ")");
	}
    });
    
    $.jsonRPC.setup({endPoint: '/rpc/abusfake.sh', namespace: 'DmngCoreStub' }).request('getConfig', 
    {
	params: {},
	success: function(result)
        {
            //alert("[JSON-RPC] Getting the device configuration : OK ");
	    console.log("[JSON-RPC] Getting the device configuration : OK ");
            //alert(_objectIntrospection(result.result));
	    
            if (result.result != null)
            {
		_setJsonToLocalstorage('jsonDmngConfig', myConfigJsonResult);
            }
        },
        
        error: function(result)
        {
	    var msg = '';
	    
            //alert("[JSON-RPC] Error message = ".result.error.message);
	    console.log("[JSON-RPC] Error message = ".result.error.message);
	    
            if (result.error.message != null)	msg += result.error.message;
            else				msg += result.error;
            
	    //alert("[JSON-RPC] Getting the device configuration : NOK (" + msg + ")");
	    console.log("[JSON-RPC] Getting the device configuration : NOK (" + msg + ")");
	}
    });
});

I wanna know if sencha touch 2, have one similar way to play with json-rpc function ?

Thanks your for your reply

Regards.

*This post is locked for comments

I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans