I’ve already added an article on this topic with all the information. You can find this article here:
I am also sending a similar JS below:
if (doo.model.<[Inquiring company (inquiringCompany)]>.value?.id)
doo.model.<[Contact person (contactPerson)]>.filterForDropdown = 'company.id === ' + doo.model.<[Inquiring company (inquiringCompany)]>.value.id;
else
doo.model.<[Contact person (contactPerson)]>.filterForDropdown = null;