When working with custom views inside Dynamics 365 you may need to create fetchXml and layoutXml strings for new temporary custom views.
The easiest way to do this, in my opinion, is to create a new Advanced Find with the information & filters you require.
Then execute the Advanced Find and get the results.
Once you’ve got the results page, open the Developer Tools (F12 in Chrome & Edge) and use the search functionality to look for fetchXml or layoutXml. You should find a div containing your strings.
These strings can the be pasted into your code and should work straight away!