How to check if a record already exists in a table using a custom script

Hello everyone,

I would like to know if it is possible to check if a record exists in a table using a custom script.
For example you have your customers and you would like to check if a given cellphone number already exists in the table. How do you do that?

Thanks for you help and suggestions.

Regards,
Kat



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 the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.
Hi Kat,

Can you describe from where you want to check this? From Customer form or from some other app via API?

Whether on client or server side?

Thanks.
Anand.


On Fri, Jan 3, 2014 at 12:03 PM, Kat <py...@gmail.com> wrote:
Hello everyone,

I would like to know if it is possible to check if a record exists in a table using a custom script.
For example you have your customers and you would like to check if a given cellphone number already exists in the table. How do you do that?

Thanks for you help and suggestions.

Regards,
Kat



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 the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.




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 the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.
Hi Anand,

I would like to check this on the Customer form from a client side (using custom script under customization).

Thank

On Friday, January 3, 2014 8:54:10 AM UTC+2, Anand Doshi wrote:
Hi Kat,

Can you describe from where you want to check this? From Customer form or from some other app via API?

Whether on client or server side?

Thanks.
Anand.


On Fri, Jan 3, 2014 at 12:03 PM, Kat <py...@gmail.com> wrote:
Hello everyone,

I would like to know if it is possible to check if a record exists in a table using a custom script.
For example you have your customers and you would like to check if a given cellphone number already exists in the table. How do you do that?

Thanks for you help and suggestions.

Regards,
Kat



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 the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.




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 the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.
Hi Kat,

Is there a custom field of phone number you want to check or you want to check the phone number of a contact?

Thanks,
Anand.




On Fri, Jan 3, 2014 at 2:52 PM, Kat <py...@gmail.com> wrote:
Hi Anand,

I would like to check this on the Customer form from a client side (using custom script under customization).

Thank


On Friday, January 3, 2014 8:54:10 AM UTC+2, Anand Doshi wrote:
Hi Kat,

Can you describe from where you want to check this? From Customer form or from some other app via API?

Whether on client or server side?

Thanks.
Anand.


On Fri, Jan 3, 2014 at 12:03 PM, Kat <py...@gmail.com> wrote:
Hello everyone,

I would like to know if it is possible to check if a record exists in a table using a custom script.
For example you have your customers and you would like to check if a given cellphone number already exists in the table. How do you do that?

Thanks for you help and suggestions.

Regards,
Kat



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 the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.




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 the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.




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 the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.
Hi Anand,

It is a custom field of ID number (passport for example) I would like to check. The problem is there can't be duplicate of ID number in the system. Because a user can enter two customers with different names or misspelled names but with the same ID number. Before saving a customer I would like to check if the ID number already exists or not.

Regards,
Kat

On Saturday, January 4, 2014 7:07:18 PM UTC+2, Anand Doshi wrote:
Hi Kat,

Is there a custom field of phone number you want to check or you want to check the phone number of a contact?

Thanks,
Anand.




On Fri, Jan 3, 2014 at 2:52 PM, Kat <py...@gmail.com> wrote:
Hi Anand,

I would like to check this on the Customer form from a client side (using custom script under customization).

Thank


On Friday, January 3, 2014 8:54:10 AM UTC+2, Anand Doshi wrote:
Hi Kat,

Can you describe from where you want to check this? From Customer form or from some other app via API?

Whether on client or server side?

Thanks.
Anand.


On Fri, Jan 3, 2014 at 12:03 PM, Kat <py...@gmail.com> wrote:
Hello everyone,

I would like to know if it is possible to check if a record exists in a table using a custom script.
For example you have your customers and you would like to check if a given cellphone number already exists in the table. How do you do that?

Thanks for you help and suggestions.

Regards,
Kat



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 the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+unsubscr…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.




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 the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.




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 the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.
Hi Kat,

Try this as an example from your console, also modifying as per your requirements:
http://pastebin.com/eJmtC52M

If the document does not exist, it will return something in r.exc of callback.

Thanks,
Anand.


On Sun, Jan 5, 2014 at 2:59 PM, Kat <py...@gmail.com> wrote:
Hi Anand,

It is a custom field of ID number (passport for example) I would like to check. The problem is there can't be duplicate of ID number in the system. Because a user can enter two customers with different names or misspelled names but with the same ID number. Before saving a customer I would like to check if the ID number already exists or not.

Regards,
Kat


On Saturday, January 4, 2014 7:07:18 PM UTC+2, Anand Doshi wrote:
Hi Kat,

Is there a custom field of phone number you want to check or you want to check the phone number of a contact?

Thanks,
Anand.




On Fri, Jan 3, 2014 at 2:52 PM, Kat <py...@gmail.com> wrote:
Hi Anand,

I would like to check this on the Customer form from a client side (using custom script under customization).

Thank


On Friday, January 3, 2014 8:54:10 AM UTC+2, Anand Doshi wrote:
Hi Kat,

Can you describe from where you want to check this? From Customer form or from some other app via API?

Whether on client or server side?

Thanks.
Anand.


On Fri, Jan 3, 2014 at 12:03 PM, Kat <py...@gmail.com> wrote:
Hello everyone,

I would like to know if it is possible to check if a record exists in a table using a custom script.
For example you have your customers and you would like to check if a given cellphone number already exists in the table. How do you do that?

Thanks for you help and suggestions.

Regards,
Kat



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 the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+unsubscr…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.




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 the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.




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 the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.




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 the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.
Correction.

You should use webnotes.client.get_value instead of webnotes.client.get

Thanks,
Anand.


On Sun, Jan 5, 2014 at 8:24 PM, Anand Doshi <an…@erpnext.com> wrote:

Hi Kat,

Try this as an example from your console, also modifying as per your requirements:

If the document does not exist, it will return something in r.exc of callback.

Thanks,
Anand.


On Sun, Jan 5, 2014 at 2:59 PM, Kat <py...@gmail.com> wrote:
Hi Anand,

It is a custom field of ID number (passport for example) I would like to check. The problem is there can't be duplicate of ID number in the system. Because a user can enter two customers with different names or misspelled names but with the same ID number. Before saving a customer I would like to check if the ID number already exists or not.

Regards,
Kat


On Saturday, January 4, 2014 7:07:18 PM UTC+2, Anand Doshi wrote:
Hi Kat,

Is there a custom field of phone number you want to check or you want to check the phone number of a contact?

Thanks,
Anand.




On Fri, Jan 3, 2014 at 2:52 PM, Kat <py...@gmail.com> wrote:
Hi Anand,

I would like to check this on the Customer form from a client side (using custom script under customization).

Thank


On Friday, January 3, 2014 8:54:10 AM UTC+2, Anand Doshi wrote:
Hi Kat,

Can you describe from where you want to check this? From Customer form or from some other app via API?

Whether on client or server side?

Thanks.
Anand.


On Fri, Jan 3, 2014 at 12:03 PM, Kat <py...@gmail.com> wrote:
Hello everyone,

I would like to know if it is possible to check if a record exists in a table using a custom script.
For example you have your customers and you would like to check if a given cellphone number already exists in the table. How do you do that?

Thanks for you help and suggestions.

Regards,
Kat



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 the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+unsubscr…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.




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 the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.




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 the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.





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 the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.
Hi Anand,

I followed your suggest with this code:


and I got this error message:

undefined

Traceback (innermost last):
  File "../lib/webnotes/handler.py", line 132, in handle
    execute_cmd(cmd)
  File "../lib/webnotes/handler.py", line 172, in execute_cmd
    ret = call(method, webnotes.form_dict)
  File "../lib/webnotes/handler.py", line 189, in call
    return fn(**newargs)
 TypeError: get_value() takes at least 2 non-keyword arguments (1 given)
 all-app.min.js:238

Object {message: "", exc: Array[1]}

I am using a virtual machine.

Thanks


On Sunday, January 5, 2014 4:55:42 PM UTC+2, Anand Doshi wrote:
Correction.

You should use webnotes.client.get_value instead of webnotes.client.get

Thanks,
Anand.


On Sun, Jan 5, 2014 at 8:24 PM, Anand Doshi <an…@erpnext.com> wrote:

Hi Kat,

Try this as an example from your console, also modifying as per your requirements:

If the document does not exist, it will return something in r.exc of callback. 

Thanks,
Anand.


On Sun, Jan 5, 2014 at 2:59 PM, Kat <py...@gmail.com> wrote:
Hi Anand,

It is a custom field of ID number (passport for example) I would like to check. The problem is there can't be duplicate of ID number in the system. Because a user can enter two customers with different names or misspelled names but with the same ID number. Before saving a customer I would like to check if the ID number already exists or not.

Regards,
Kat


On Saturday, January 4, 2014 7:07:18 PM UTC+2, Anand Doshi wrote:
Hi Kat,

Is there a custom field of phone number you want to check or you want to check the phone number of a contact?

Thanks,
Anand.




On Fri, Jan 3, 2014 at 2:52 PM, Kat <py...@gmail.com> wrote:
Hi Anand,

I would like to check this on the Customer form from a client side (using custom script under customization).

Thank


On Friday, January 3, 2014 8:54:10 AM UTC+2, Anand Doshi wrote:
Hi Kat,

Can you describe from where you want to check this? From Customer form or from some other app via API?

Whether on client or server side?

Thanks.
Anand.


On Fri, Jan 3, 2014 at 12:03 PM, Kat <py...@gmail.com> wrote:
Hello everyone,

I would like to know if it is possible to check if a record exists in a table using a custom script.
For example you have your customers and you would like to check if a given cellphone number already exists in the table. How do you do that?

Thanks for you help and suggestions.

Regards,
Kat



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 the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+unsubscr…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.




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 the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+unsubscr…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.




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 the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.





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 the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.
Hi Kat,

Fieldname argument is missing. Please look at webnotes/client.py file for the function.

Try this:
http://pastebin.com/NRedfPy9

Thanks,
Anand.




On Mon, Jan 6, 2014 at 12:40 PM, Kat <py...@gmail.com> wrote:
Hi Anand,

I followed your suggest with this code:


and I got this error message:

undefined

Traceback (innermost last):
File "../lib/webnotes/handler.py", line 132, in handle
execute_cmd(cmd)
File "../lib/webnotes/handler.py", line 172, in execute_cmd
ret = call(method, webnotes.form_dict)
File "../lib/webnotes/handler.py", line 189, in call
return fn(**newargs)
TypeError: get_value() takes at least 2 non-keyword arguments (1 given)
all-app.min.js:238

Object {message: "", exc: Array[1]}

I am using a virtual machine.

Thanks


On Sunday, January 5, 2014 4:55:42 PM UTC+2, Anand Doshi wrote:
Correction.

You should use webnotes.client.get_value instead of webnotes.client.get

Thanks,
Anand.


On Sun, Jan 5, 2014 at 8:24 PM, Anand Doshi <an…@erpnext.com> wrote:

Hi Kat,

Try this as an example from your console, also modifying as per your requirements:

If the document does not exist, it will return something in r.exc of callback.

Thanks,
Anand.


On Sun, Jan 5, 2014 at 2:59 PM, Kat <py...@gmail.com> wrote:
Hi Anand,

It is a custom field of ID number (passport for example) I would like to check. The problem is there can't be duplicate of ID number in the system. Because a user can enter two customers with different names or misspelled names but with the same ID number. Before saving a customer I would like to check if the ID number already exists or not.

Regards,
Kat


On Saturday, January 4, 2014 7:07:18 PM UTC+2, Anand Doshi wrote:
Hi Kat,

Is there a custom field of phone number you want to check or you want to check the phone number of a contact?

Thanks,
Anand.




On Fri, Jan 3, 2014 at 2:52 PM, Kat <py...@gmail.com> wrote:
Hi Anand,

I would like to check this on the Customer form from a client side (using custom script under customization).

Thank


On Friday, January 3, 2014 8:54:10 AM UTC+2, Anand Doshi wrote:
Hi Kat,

Can you describe from where you want to check this? From Customer form or from some other app via API?

Whether on client or server side?

Thanks.
Anand.


On Fri, Jan 3, 2014 at 12:03 PM, Kat <py...@gmail.com> wrote:
Hello everyone,

I would like to know if it is possible to check if a record exists in a table using a custom script.
For example you have your customers and you would like to check if a given cellphone number already exists in the table. How do you do that?

Thanks for you help and suggestions.

Regards,
Kat



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 the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+unsubscr…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.




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 the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+unsubscr…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.




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 the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.





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 the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.




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 the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.
Hi Anand,

Thank you for your help. Things are working quite fine.
But there is a problem. The script doesn't halt after checking the existence of a customer with the same id_number. It displays a message and saves the new customer with the very same id_number.

Please look at http://pastebin.com/aXhEQhxq

Thank you.

On Tuesday, January 7, 2014 8:33:44 AM UTC+2, Anand Doshi wrote:
Hi Kat,

Fieldname argument is missing. Please look at webnotes/client.py file for the function.

Try this:

Thanks,
Anand.




On Mon, Jan 6, 2014 at 12:40 PM, Kat <py...@gmail.com> wrote:
Hi Anand,

I followed your suggest with this code:


and I got this error message:

undefined

Traceback (innermost last):
  File "../lib/webnotes/handler.py", line 132, in handle
    execute_cmd(cmd)
  File "../lib/webnotes/handler.py", line 172, in execute_cmd
    ret = call(method, webnotes.form_dict)
  File "../lib/webnotes/handler.py", line 189, in call
    return fn(**newargs)
 TypeError: get_value() takes at least 2 non-keyword arguments (1 given)
 all-app.min.js:238

Object {message: "", exc: Array[1]}

I am using a virtual machine.

Thanks


On Sunday, January 5, 2014 4:55:42 PM UTC+2, Anand Doshi wrote:
Correction.

You should use webnotes.client.get_value instead of webnotes.client.get

Thanks,
Anand.


On Sun, Jan 5, 2014 at 8:24 PM, Anand Doshi <an…@erpnext.com> wrote:

Hi Kat,

Try this as an example from your console, also modifying as per your requirements:

If the document does not exist, it will return something in r.exc of callback. 

Thanks,
Anand.


On Sun, Jan 5, 2014 at 2:59 PM, Kat <py...@gmail.com> wrote:
Hi Anand,

It is a custom field of ID number (passport for example) I would like to check. The problem is there can't be duplicate of ID number in the system. Because a user can enter two customers with different names or misspelled names but with the same ID number. Before saving a customer I would like to check if the ID number already exists or not.

Regards,
Kat


On Saturday, January 4, 2014 7:07:18 PM UTC+2, Anand Doshi wrote:
Hi Kat,

Is there a custom field of phone number you want to check or you want to check the phone number of a contact?

Thanks,
Anand.




On Fri, Jan 3, 2014 at 2:52 PM, Kat <py...@gmail.com> wrote:
Hi Anand,

I would like to check this on the Customer form from a client side (using custom script under customization).

Thank


On Friday, January 3, 2014 8:54:10 AM UTC+2, Anand Doshi wrote:
Hi Kat,

Can you describe from where you want to check this? From Customer form or from some other app via API?

Whether on client or server side?

Thanks.
Anand.


On Fri, Jan 3, 2014 at 12:03 PM, Kat <py...@gmail.com> wrote:
Hello everyone,

I would like to know if it is possible to check if a record exists in a table using a custom script.
For example you have your customers and you would like to check if a given cellphone number already exists in the table. How do you do that?

Thanks for you help and suggestions.

Regards,
Kat



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 the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+unsubscr…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.




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 the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+unsubscr…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.




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 the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+unsubscr…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.





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 the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.




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 the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.
Hi Kat,

Try passing async: False in wn.call

Thanks,
Anand.


On Tue, Jan 7, 2014 at 1:37 PM, Kat <py...@gmail.com> wrote:
Hi Anand,

Thank you for your help. Things are working quite fine.
But there is a problem. The script doesn't halt after checking the existence of a customer with the same id_number. It displays a message and saves the new customer with the very same id_number.


Thank you.


On Tuesday, January 7, 2014 8:33:44 AM UTC+2, Anand Doshi wrote:
Hi Kat,

Fieldname argument is missing. Please look at webnotes/client.py file for the function.

Try this:

Thanks,
Anand.




On Mon, Jan 6, 2014 at 12:40 PM, Kat <py...@gmail.com> wrote:
Hi Anand,

I followed your suggest with this code:


and I got this error message:

undefined

Traceback (innermost last):
File "../lib/webnotes/handler.py", line 132, in handle
execute_cmd(cmd)
File "../lib/webnotes/handler.py", line 172, in execute_cmd
ret = call(method, webnotes.form_dict)
File "../lib/webnotes/handler.py", line 189, in call
return fn(**newargs)
TypeError: get_value() takes at least 2 non-keyword arguments (1 given)
all-app.min.js:238

Object {message: "", exc: Array[1]}

I am using a virtual machine.

Thanks


On Sunday, January 5, 2014 4:55:42 PM UTC+2, Anand Doshi wrote:
Correction.

You should use webnotes.client.get_value instead of webnotes.client.get

Thanks,
Anand.


On Sun, Jan 5, 2014 at 8:24 PM, Anand Doshi <an…@erpnext.com> wrote:

Hi Kat,

Try this as an example from your console, also modifying as per your requirements:

If the document does not exist, it will return something in r.exc of callback.

Thanks,
Anand.


On Sun, Jan 5, 2014 at 2:59 PM, Kat <py...@gmail.com> wrote:
Hi Anand,

It is a custom field of ID number (passport for example) I would like to check. The problem is there can't be duplicate of ID number in the system. Because a user can enter two customers with different names or misspelled names but with the same ID number. Before saving a customer I would like to check if the ID number already exists or not.

Regards,
Kat


On Saturday, January 4, 2014 7:07:18 PM UTC+2, Anand Doshi wrote:
Hi Kat,

Is there a custom field of phone number you want to check or you want to check the phone number of a contact?

Thanks,
Anand.




On Fri, Jan 3, 2014 at 2:52 PM, Kat <py...@gmail.com> wrote:
Hi Anand,

I would like to check this on the Customer form from a client side (using custom script under customization).

Thank


On Friday, January 3, 2014 8:54:10 AM UTC+2, Anand Doshi wrote:
Hi Kat,

Can you describe from where you want to check this? From Customer form or from some other app via API?

Whether on client or server side?

Thanks.
Anand.


On Fri, Jan 3, 2014 at 12:03 PM, Kat <py...@gmail.com> wrote:
Hello everyone,

I would like to know if it is possible to check if a record exists in a table using a custom script.
For example you have your customers and you would like to check if a given cellphone number already exists in the table. How do you do that?

Thanks for you help and suggestions.

Regards,
Kat



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 the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+unsubscr…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.




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 the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+unsubscr…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.




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 the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+unsubscr…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.





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 the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.




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 the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.




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 the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.
Hi Anand,

I tried to pass async: False but nothing changed, unless I passed it in a wrong way (a coded example might help).
The code is working quite fine but it does not stop after checking. Any better suggestion?

Thank you,
Kat

On Wednesday, January 8, 2014 9:16:28 AM UTC+2, Anand Doshi wrote:
Hi Kat,

Try passing async: False in wn.call

Thanks,
Anand.


On Tue, Jan 7, 2014 at 1:37 PM, Kat <py...@gmail.com> wrote:
Hi Anand,

Thank you for your help. Things are working quite fine.
But there is a problem. The script doesn't halt after checking the existence of a customer with the same id_number. It displays a message and saves the new customer with the very same id_number.


Thank you.


On Tuesday, January 7, 2014 8:33:44 AM UTC+2, Anand Doshi wrote:
Hi Kat,

Fieldname argument is missing. Please look at webnotes/client.py file for the function.

Try this:

Thanks,
Anand.




On Mon, Jan 6, 2014 at 12:40 PM, Kat <py...@gmail.com> wrote:
Hi Anand,

I followed your suggest with this code:


and I got this error message:

undefined

Traceback (innermost last):
  File "../lib/webnotes/handler.py", line 132, in handle
    execute_cmd(cmd)
  File "../lib/webnotes/handler.py", line 172, in execute_cmd
    ret = call(method, webnotes.form_dict)
  File "../lib/webnotes/handler.py", line 189, in call
    return fn(**newargs)
 TypeError: get_value() takes at least 2 non-keyword arguments (1 given)
 all-app.min.js:238

Object {message: "", exc: Array[1]}

I am using a virtual machine.

Thanks


On Sunday, January 5, 2014 4:55:42 PM UTC+2, Anand Doshi wrote:
Correction.

You should use webnotes.client.get_value instead of webnotes.client.get

Thanks,
Anand.


On Sun, Jan 5, 2014 at 8:24 PM, Anand Doshi <an…@erpnext.com> wrote:

Hi Kat,

Try this as an example from your console, also modifying as per your requirements:

If the document does not exist, it will return something in r.exc of callback. 

Thanks,
Anand.


On Sun, Jan 5, 2014 at 2:59 PM, Kat <py...@gmail.com> wrote:
Hi Anand,

It is a custom field of ID number (passport for example) I would like to check. The problem is there can't be duplicate of ID number in the system. Because a user can enter two customers with different names or misspelled names but with the same ID number. Before saving a customer I would like to check if the ID number already exists or not.

Regards,
Kat


On Saturday, January 4, 2014 7:07:18 PM UTC+2, Anand Doshi wrote:
Hi Kat,

Is there a custom field of phone number you want to check or you want to check the phone number of a contact?

Thanks,
Anand.




On Fri, Jan 3, 2014 at 2:52 PM, Kat <py...@gmail.com> wrote:
Hi Anand,

I would like to check this on the Customer form from a client side (using custom script under customization).

Thank


On Friday, January 3, 2014 8:54:10 AM UTC+2, Anand Doshi wrote:
Hi Kat,

Can you describe from where you want to check this? From Customer form or from some other app via API?

Whether on client or server side?

Thanks.
Anand.


On Fri, Jan 3, 2014 at 12:03 PM, Kat <py...@gmail.com> wrote:
Hello everyone,

I would like to know if it is possible to check if a record exists in a table using a custom script.
For example you have your customers and you would like to check if a given cellphone number already exists in the table. How do you do that?

Thanks for you help and suggestions.

Regards,
Kat



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 the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+unsubscr…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.




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 the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+unsubscr…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.




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 the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+unsubscr…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.





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 the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+unsubscr…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.




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 the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.




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 the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.
You can't do async checks in client validate.

move your validation to server-side.



On Wednesday, January 8, 2014 1:25:26 PM UTC+5:30, Kat wrote:
Hi Anand,

I tried to pass async: False but nothing changed, unless I passed it in a wrong way (a coded example might help).
The code is working quite fine but it does not stop after checking. Any better suggestion?

Thank you,
Kat




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 the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.
Thank you Rushabh,

I will try to do that. But another problem I face is I am using a virtual machine and I am unable to view the server-side codes. 
How can I view the source codes of a virtual machine?

Kind regards,
Kat.

On Saturday, January 11, 2014 1:28:07 PM UTC+2, rushabh wrote:
You can't do async checks in client validate.

move your validation to server-side.



On Wednesday, January 8, 2014 1:25:26 PM UTC+5:30, Kat wrote:
Hi Anand,

I tried to pass async: False but nothing changed, unless I passed it in a wrong way (a coded example might help).
The code is working quite fine but it does not stop after checking. Any better suggestion?

Thank you,
Kat




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 the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.

Hi Kat,

On Mon, Jan 13, 2014 at 1:19 PM, Kat py...@gmail.com wrote:

Thank you Rushabh,

I will try to do that. But another problem I face is I am using a virtual
machine and I am unable to view the server-side codes.
How can I view the source codes of a virtual machine?

The code in the vm is at /home/erpnext/erpnext. You can try installing
GNOME/KDE and a text editor (gedit/kate).

Also, the server needs to reload everytime you change code, so I
suggest using the development server, (./lib/wnf.py --serve --port
8090) which reloads automatically on code change.

Kind regards,
Kat.

Thanks,


Pratik
erpnext

Hello everyone,

I’m beginner to frappe. I wanna check the name in the table already exists or not

For example you have your customers and you would like to check if a given Name already exists in the table. How do you do that?
and also how can i update the same date field from one Doc type to another doc type(Using Python)

Thanks for you help and suggestions.

Regards,

Raghavendra