I added a CRM-GRID on one of my page and added up multiple linked-entities in that Grid, the last linked entity which is showing up correctly in Fetch-XML text window is not setting up properly if I go back to edit Fetch-XML by clicking on Build and if I open Build window.
It saved the correct entity when I tried to create it for the first time, however, the Edit mode is not setting up drop-down properly. It is setting up as the first entity in the drop down.
<link-entity name="
contact" from="contactid" to="
primarycontactid" alias="">
<filter type="and">
<condition attribute="contactid" operator="eq" value="@userID@"/>
</filter>
</link-entity>