Hide the folder name and keep only the nodes in linking fields

Hello,
I’m using territory in the Lead document and it’s a link data type that fetches the data from the territory doctype.
However, it fetches also the folder names as you see in the photo below (All territories). Is there a way to hide the folder names and force the user to choose a node only?

hide

Hi @Mohsin1990,

Please check below image:

Thank You!

I removed it but it just remove the small text under the main name as you can see and compare the two photos above and below

screenshot_60

Ok.
want you hide/remove parent name in list ?

Hi @Mohsin1990,

For Folder/Parent name remove

Please apply client script:

frappe.ui.form.on("Lead", "onload", function(frm) {
    frm.set_query("territory", function() {
        return {
            "filters": {
                "is_group": 0
                }
            };
    });
}); 

It’s a really work for you.

Thank You!

1 Like

Thank you, this resolved the issue.

1 Like