Auto Fetch Custom Scrip

I used the following script to try and get the nda_expiration_date to be fetched when a Customer was selected on an Opportunity but it doesn't work:

cur_frm.cscript.customer = function(doc) {
    cur_frm.call({
        method: "get_nda_expiration_date",
        args: { customer: doc.customer }
    });
}

What am I doing wrong here?



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.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/d1645f33-da82-4245-83b1-ab560a5451a2%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
Please open your JS console and reproduce the trace. Also mention which version you are using.

On Friday, April 18, 2014 12:49:37 AM UTC+5:30, Nate Gallery wrote:
I used the following script to try and get the nda_expiration_date to be fetched when a Customer was selected on an Opportunity but it doesn't work:

cur_frm.cscript.customer = function(doc) {
    cur_frm.call({
        method: "get_nda_expiration_date",
        args: { customer: doc.customer }
    });
}

What am I doing wrong here?



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.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/f7bc7b4e-08f8-4d5e-9a36-38b87a1d2f7e%40googlegroups.com.

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