Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SyntaxError: Unexpected token W #3

Open
rosieGK opened this issue Apr 7, 2014 · 2 comments
Open

SyntaxError: Unexpected token W #3

rosieGK opened this issue Apr 7, 2014 · 2 comments

Comments

@rosieGK
Copy link

rosieGK commented Apr 7, 2014

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

@clipi
Copy link
Owner

clipi commented Apr 8, 2014

Hi Rosie,

I don't use this module for 2 years...
You coult try to log the body (of vtiger response) before the JSON.parse (line 105 in coffeescript, 130 in js)

Hope this helps.
Best regards
Marco

@rosieGK
Copy link
Author

rosieGK commented Apr 8, 2014

Hi Marco,

I have tried logging the body of the message passed. it prints the correct message but somehow response from request.post() is null....

Thanks for your help....

Regards
Rosie

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants