In linked field, how to extend search beyond ID

When entering text into linked fields, I’ve noticed that Frappe sometimes searches through just the ID of the linked document but sometimes other relevant fields. For example, notice that the Sales Invoice doctype will search through Customer Name when linking a Customer document:

…but Program Enrollment does not search Student Name when linking a Student document:

Where is this functionality determined?

2 Likes

Could you find the solution to this? I saw this working in v10, I mean you can search using the search_fields but the same isn’t working in v12!

I ended up fixing my issue a different way, but I’m still not quite clear on how search flows are determined.

Now, in 2025 and with Framework v15 I also have this question. Any news on this?

@dploeger open doctype → view settings → search fields

Thanks. I did that. I have a Doctype with an int field called “year” and I’ve added that fieldname to the search fields settings.

That doesn’t work though. Or are int fields not supported?

@dploeger system will mix up id and year .

It didn’t find anything for the year.

But I’ve switched the type to data now and now it works.