I'm exploring a concept that involves exposing Custom Metadata Type records to business users in a read-only format in a kind of pseudo-record-detail-page in Lightning Experience. My requirements are:
- Use LWC to create "detail pages" for Custom Metadata Type records + an Apex controller to query for them.
- Let users open these detail pages in Lightning Experience via URL formula field links on custom object records that pseudo-"look up" to those metadata records via a text field.
- The detail pages should open within the Lightning Experience navigation.
- The solution should avoid Visualforce wrappers so we don't end up with a fixed-height page. (Also: because Visualforce is so not what we want to be using anymore when building cool Lightning stuff in 2020)
Based on #3, I think I'm forced to use a Lightning Page, i.e. no standalone Aura apps. Of the 3 types of Lightning Page available, I believe the only one that accepts and passes along a URL parameter is Record Page -- and it will only pass along a record ID for a standard or custom object -- no Custom Metadata identifiers.
I have tried both window.location.search
and CurrentPageReference with URL parameters in a Lightning App Page as suggested here -- but both of these turn up empty. Based on what I'm seeing, it looks like Lightning Experience is nuking all added URL parameters on these types of pages before it loads the components.
Any solutions I haven't thought of yet?