Advertisement
Guest User

Untitled

a guest
Jan 7th, 2014
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. cur_frm.cscript.custom_validate = function(doc){
  2.  
  3.     wn.call({
  4.             method:"webnotes.client.get_value",
  5.                 args: {
  6.                         doctype:"Customer",
  7.                         fieldname: "customer_name",
  8.                         filters: {
  9.                             id_number: doc.id_number
  10.                         },
  11.                 },
  12.             callback: function(r) {
  13.                     console.log(r);
  14.                     msgprint((r.message), "already exists!");
  15.                     validated = false;
  16.             }
  17.            
  18.         });
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement