Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

vtwsclib vTiger library with appcelerator

$
0
0

Hello.

I'm trying to use the javascript CRM library for vTiger whitin my appcelerator alloy project. Titanium SDK 4.1.0.GA

vtwsclib-1.5.zip

I'm new to appcelerator so i can't use the library. I put the library folder under lib folder within my project.

My code so far it's:

var vTClient = require('Vtiger/WSClient'); 
 
var tigerClient = new Vtiger_WSClient(tigerUrl);
 
//var tigerClient = vTClient(tigerUrl);
 
tigerClient.doLogin(userCRM, accessKey, postLogin); 
 
var postLogin = function(result, args){
    if(!result) alert('tiger CRM FAIL');
    else postGetModules();
};
 
var getModules = function(){
    client.doListTypes(postGetModules);
};
 
var postGetModules = function(modules, args){
    if(modules) Ti.API.info(client.toJSONString(modules));
};

I'm getting the error:

[ERROR] : TiExceptionHandler: (main) [5281,5281] ----- Titanium Javascript Runtime Error ----- [ERROR] : TiExceptionHandler: (main) [5,5286] - In alloy/controllers/index.js:54,27 [ERROR] : TiExceptionHandler: (main) [3,5289] - Message: Uncaught ReferenceError: Vtiger_WSClient is not defined [ERROR] : TiExceptionHandler: (main) [2,5291] - Source: var tigerClient = new Vtiger_WSClient(tigerUrl); [ERROR] : V8Exception: Exception occurred at alloy/controllers/index.js:54: Uncaught ReferenceError: Vtiger_WSClient is not defined

Any idea to correctly implement the library inside appcelerator would be much appreciated.


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>