What's up with all the different name fields for Customer?

46 views
Skip to first unread message

Jev Björsell

unread,
Dec 28, 2013, 7:59:14 PM12/28/13
to erpnext-dev...@googlegroups.com


I'm loading data using the https://github.com/webnotes/wn-client library.

When creating a customer via the API, my API request fields are not corresponding with the fields being returned by the API.

For example, 
I set 'name' to "ABC123" on my wn.inesert call, I get a response with a field called 'localname' that contains my "ABC123" value.
The same happens with customer_name, this gets returned as a filed called 'name'.

Then in the web app interface, there is also 'Full Name' and 'ID'.

This is very confusing. :(



rushabh

unread,
Dec 30, 2013, 5:51:21 AM12/30/13
to erpnext-dev...@googlegroups.com
Customer name can be set by the "customer_name" property or by the series.

Leave name as blank and set "customer_name" property while inserting via API.

Sorry not very intuitive - we should allow if explicit name is set.

Jev Björsell

unread,
Dec 30, 2013, 7:01:57 PM12/30/13
to erpnext-dev...@googlegroups.com
Thanks 

For Contact, as far as I can see, it is not possible to set the name filed for Contact via the API, it is always generated from Firstname, Lastname and Customer Name. This has a side affect of not being able to but single quotes in names, for example O'Brien.

Am I misunderstanding how the name field for Contact can be set via the API?

-Jev

rushabh

unread,
Dec 31, 2013, 7:55:45 PM12/31/13
to erpnext-dev...@googlegroups.com
Jev,

You are right about Contact - the name is generated from First Name, Last Name.

We have fixed the string replacement in most places, maybe we can allow quotes in name now, but someone will have to test it first!

best,
Rushabh

Jev Björsell

unread,
Jan 1, 2014, 9:54:54 PM1/1/14
to erpnext-dev...@googlegroups.com
I guess I should update my installation and test this. Will let you know.


--
Note:
 
If you are posting an issue,
1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
 
End of Note
---
You received this message because you are subscribed to a topic in the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/erpnext-developer-forum/xTzUkIqWsUI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to erpnext-developer...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages