I have a link field which which displays all suppliers. I would like to write a custom script such that it shows only those suppliers whose type=‘manufacturer’ . How do i go about this ?
I came across this piece of code which is suppose to overload the query.I tried changing this to my requirements but it pops a error “this query style is discontinued”.
Could someone help me understand this? and how do i change this to fit my needs ?
cur_frm.fields_dict['test_link'].get_query = function(doc,dt,dn) {
return "SELECT tabDocType.name FROM tabDocType WHERE IFNULL(tabDocType.issingle,0)=0 AND tabDocType.name LIKE '%s'"
}
Please consider following syntax, you can add multiple filters as per requirement. While processing system generates where clause and joins with "and " condition operator in case of more than one filter.