How to Remove "All Item Groups" Option from Item Group Dropdown in Item DocType?

Hello,

In the Item DocType, how can I remove just the option of “All Item Groups” so that the user has to select one the of the child item groups?

image

Thanks,
Paul

Hi @pmjd,

Please apply the client scrip for that.

frappe.ui.form.on('Item',  {
    refresh: function(frm) {
        frm.set_query("item_group", () => {
          return {
            "filters": {
              "is_group": 0
            },
          };
        });
    }
});

Output:

Thank You!

1 Like

Thank you @NCP :smiley: