Custom Query


 Hello sir
                  I have added custom query for newly added doctype. Same query work on my local setup but not working on client’s local setup.
i used following query
 
 cur_frm.fields_dict[‘group_opm’].get_query = function(doc, cdt, cdn) {
  return “select p.name from tabProfile p, tabUserRole u where u.parent=p.name and u.role=‘Group Operations Manager’” ;
 }

 It give me an error

      TypeError: cur_frm.field_dict is undefined

Thanx & Regards
Rohit



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 post to this group, send email to er...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/KOeRFBbrWlIJ.

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

 

 

Its cur_frm.fields_dict (with an s)

You don't use copy-paste?


On 25-Mar-2013, at 6:41 PM, Rohit Waghchaure <ro...@indictranstech.com> wrote:


 Hello sir
                  I have added custom query for newly added doctype. Same query work on my local setup but not working on client's local setup.
i used following query
 
 cur_frm.fields_dict['group_opm'].get_query = function(doc, cdt, cdn) {
  return "select p.name from tabProfile p, tabUserRole u where u.parent=p.name and u.role='Group Operations Manager'" ;
 }

 It give me an error

      TypeError: cur_frm.field_dict is undefined

Thanx & Regards
Rohit



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 post to this group, send email to er…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/KOeRFBbrWlIJ.

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

 

 




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 post to this group, send email to er...@googlegroups.com.

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