Dependable Field options

Dear Team,

We have field called Supplier Type in Purchase Order, when we select Supplier Type Individual so only that supplier should be visible in Supplier Field.

How we can do this ? any idea ?

Hi, please try

frappe.ui.form.on(“Your Doctype”, {
onload: function(frm) {
frm.set_query(‘supplier’, function() {
return {
filters: [“Supplier”, “supplier_type”,“=”,“Individual”]

1 Like

can we run this script into browser console ?

yes, it’s you should create Custom Script in your ERPNext site