How to get current facility id in a component for use in titleUrl?


I’ve a tile in FacilityHome component (which is in Facility page) that I’m trying to link to the analyzePerformance tab of this faciliy.

In the titleUrl, I tried with they all give empty strings, when trying with id I got development (which I beleive is the ID of the UIConfig environment):

                "component": "EnergyManagement.FacilityEnergyEUI",
                "id": "FacilityEnergyEUIMetricTile",
                "renderTo": "#energyEUIMetricTile",
                "titleAlign": "center",
                "titleUrl": "/energymgt/facility/{{ }}?activeTabs=FacilityTabPanel=analyzePerformance",
                "box": true

What the proper data holder in this case?



To resolve the, it will call C3.script.helpers.matchDynamicContent behind the scene. It will try to extract all dynamic fields from record, pageParams and environment, in this order of priority. The data you get, development with id, most probably comes from environment. What you are missing in your component definition is the data field with a record from which you will get the id.