I’m writing this mainly because it gets asked so much and in some cases the newbies are trying to figure out where on earth am I going to get the Layout XML to add a custom view or modify the lookup to use a different view.
Here is a quick way of accomplishing this.
- Create an empty solution and add the Entity in question which you are trying to change. If you are querying deep and want to display related records field values.
- Create a Personal View with the required layout. Save and Publish.
- Export this solution as an UNMANAGED Solution. Save the ZIP file.
- Unzip the solution file.
- Open customization.xml file using Notepad++ and under SavedQueries node for the entity in question, look for the Personal View you created using Name.
- Viola, you will see the LayoutXML and FetchXML.