On a weekly basis I typically go through the Portals category on the Dynamics 365 Community forums and respond to posts where I think I can add some value. This past week I came across a post where someone was asking a pretty straight-forward question, with a straight-forward answer that unfortunately can be difficult to track down. So I figured it might be worth writing up a quick post on *cue ominous music* undocumented site settings and content snippets.
In this particular case, the person wants to adjust the number of records that appear in the grid shown in the modal popup shown when a lookup exists on an Entity Form. As I said, simple question. And the simple answer is that there is a site setting called Portal/Lookup/Modal/Grid/PageSize that you can use to control the page size on lookup modals. Unfortunately, you won’t find that site setting by default in your Dynamics instance, nor will you find it within the official Microsoft documentation. So how can you find out what options are available?
There are three main strategies I can offer for this:
I covered this in a blog post last year, but it’s worth repeating: all of these undocumented site settings and content snippets are located somewhere in the code, and Microsoft released a version of the code for all to see.
Now, be warned – this technique can be a bit like trying to find a needle in a haystack. There is a lot of code in the source code release, and if you’re not familiar with it, there is a bit of a learning curve to understand how it is all architected. If you’re going to do a lot of portal work I recommend getting comfortable with this technique, however when you’re just getting started, or if it is a one-off project, it can be pretty overwhelming, so you might want to consider some of the other strategies.
Where this strategy falls apart is for any functionality that didn’t exist when the source code was released. Functionality like the SharePoint integration didn’t exist when the source code was released, so if there are content snippets or site settings associated with it, you’re not going to be able to find them using this technique.
Another great resource is this page from the legacy Adxstudio Community Site, which is titled Content Snippets Used by Portal Applications.
This title is a bit misleading – it actually contains both Content Snippets and Site Settings, although there is no way to distinguish between them on this list. As a general rule, content snippets are for text that appears on a page, whereas site settings are for configuration. If you’re not sure which is which, trial and error is your friend here.
I believe this was Adxstudio’s attempt to provide a list of all of the content snippets and site settings available. While at the time of its release that may have been true, this page has not been maintained, so there are valid content snippets and site settings that aren’t listed on this page. However, it is still a great resource – you’ll notice that the site setting the original poster was looking for in the forum thread that inspired this post is in the list.
Finally, if you’re not having luck with either of the above options, do as the original poster of the forum thread that inspired this post did and ask the community – probably your best bet is the official Dynamics 365 Community forums, or the CRMUG/D365UG forums if you’re a member. There a quite a few people with Portals expertise who actively monitor both of those forums and are constantly posting answers. If a site setting or content snippet exists, the community will point you in the right direction!