Restrict field to certain companies?

If you’re using ERPNext with multiple companies, and certain fields only apply to specific companies, is there a way to only show the fields to DocTypes assigned to that company.

For example, if I have the Lead field “Favorite Food,” I only want to show that field if the Lead company is “My ERP Restaurant”

Hi @oguruma I think to achieve what you want, you can make 2 approach with this:
:speech_balloon: assuming that Lead Company is some field in the same DocType

  1. Use Form Script here some documentation Form Scripts . You can write the logic on event : refresh, and lead_company.

  2. Use Display Depends On in the DocType Field / use Customize Form. Here some references you can look up into How to set Display Depends on for multiple options?

Cheers, hope it help.