I have done a code that will not allow the users to convert an account to partner and set the field Type to a particular value. So far all is working as expected. However, the user can still take out the primary contact role afterwards. This means they set the primary contact role, so they are allowed to set the account for a particular Type and convert it into partner, but after this they can take out the primary contact. I hope this is clear.
To tackle this issue I was thinking of creating a trigger for the object AccountContactRole to code the constraint, but it is not possible to use a trigger over that object.
Can you please advise?