I have multiple custom views for the entity type "Connection" in order to show sub-grids on forms with connections between my custom entities. Many of these views are filtering for the "type from" or "type to" field. As I see in the exported solution, this is saved in "saved queries" as a FetchXML expression containing something like:
<filter type="or">
<condition attribute="record2objecttypecode" operator="eq" value="10091" />
<condition attribute="record2objecttypecode" operator="eq" value="10095" />
</filter>
Unfortunately, after exporting these views in a managed solution and importing them into a new environment, the filters simply fail, because the "object type code" of custom entities is not stable (it seems that the object type code not even exported into the solution). My current solution to this problem ist that I export all object type code of my solution together with the logical names into a JSON file and after I imported the managed solution, I'm replacing the values of the object type codes in all saved queries with the new object type codes (determined by the logical name).
Is there a supported way, using the UI to create views that filter for a specific record object type, so that I can use these views in managed solutions in different environments without customizing the views after the import?