Giter VIP home page Giter VIP logo

node-vtiger's People

Contributors

adrianhunter avatar clipi avatar itag avatar urinprobe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

node-vtiger's Issues

Does not process a callback when it creates a new organization user

When I try to create a new user with role H1 (organization user) the callback is not fired:

vtiger.doCreate('Users', {
  user_name        : "johndoe",
  user_password    : "jnajsbchbweui",
  confirm_password : "jnajsbchbweui",
  last_name        : "Doe",
  first_name       : "John",
  roleid           : "H1", // This is the organization role id
  email1           : "[email protected]"
}, function (err, user) {
  // Returns nothing because callback not run
  console.log("Error:", err);
  console.log("User:", user);
});

If I try with the same code changing roleid to "H2" (CEO user), the callback is fired correctly without error and with new user object. Do you know why this happens?

Thanks in advance.

SyntaxError: Unexpected token W

Hi there

I am trying to create a invoice with the following valueMap

{"subject":"Tax Invoice","customerno":"000102","invoicedate":"12-12-2013","account_id":"11x14","invoicestatus":"Created","assigned_user_id":"20x4","cf_701":9855,"bill_street":"Level 3, 606 St. Kilda Road","ship_street":"Level 3, 606 St. Kilda Road","bill_city":"Melbourne","ship_city":"Melbourne","bill_state":"Vic","ship_state":"Vic","bill_code":"3004","ship_code":"3004","bill_country":"AUS","ship_country":"AUS","description":"Billing Period: 032014\nDomain: ssdias\n ","terms_conditions":"Net 7","currency_id":"21x1","hdnTaxType":"group","LineItems":[{"productid":"25x133","quantity":40,"listprice":20,"tax4":10}],"productid":"25x133"}

but I get this error Unexpected token W at Object.parse(native) when I use
client.doCreate('Invoice', valueMap, response);

Any help will be appreciated.....

thanks
Rosie

escape() vs encodeURI()

Greetings,

In the main source of the node vtiger lib in the libe ~239 in the function doQuery you could change the escape() function to the query to encodeURI().

This is because the latin characters and other characters return error when you query them.

NodeVtigerWS.prototype.doQuery = function(query, callback) {
  var params,
    _this = this;
  this.callback = callback;
  this.log.trace('doQuery: ' + query);
  if (!this.__checkLogin()) {
    return this.__performCallback(this._lastError, false);
  }
  if (query.indexOf(";") === -1) {
    query += ";";
  }
  params = '?operation=query&sessionName=' + this._wsSessionName + '&query=' + encodeURI(query);
  this.log.trace(this._wsUrl + params);
  request(this._wsUrl + params, function(e, r, body) {
    return _this.__processResponse(e, r, body);
  });
};

Is this correct? I have tested against my implementation of vtiger and it works the right way like this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.