Get Dynamics CRM layoutXml used in View from DevTools
Most times when you want to use AddCustomView() method to a Dynamics 365 control, you need to pass layoutXml to the method that will show the view you define.

There’s an easier trick than writing this up.
Select your View
Assuming, you have an Advanced Find view open in the window which you want as a layoutXml of, on the same, press F12 to open Dev Tools. Select the selector.

And on the Advanced Find window, select Body section

Click on it, and the par will be selected in the Console of the Dev Tools.
Once this is available, search for layoutXml and cycle through the results to go to the last result.

select the “value” part. That is your layoutXml. Hope this helps.
Related posts:
How a Multi-Country Infrastructure Group Evaluated One vs Two Production Environments in Dynamics 36...

How an Australian Linen Company Made Quote Approvals Secure with One Time Links in Dynamics 365

Recovering Lost Approval History After a Purchase Order Deletion in Business Central

