Coolest. Function. EVER!!!
This is a copy of a BB function with a similar name. It allows the report writer to add a link back to Atlas into reports. This is most useful when displaying detail. We have also found it helpful to format the field as a hyperlink, eg blue and underlined.
BBDW.PH_UFN_GETAPPLICATIONLINK takes three parameters:
- PageID – The GUID for the Page to open.
- ContextRecordID – The GUID for the specific record to open and must be the same context as the Page (e.g., for the Constituent Page, the Record ID must be a Constituent ID – it can’t be an Interaction). If a Page doesn’t have or require a Context (e.g., the Batch Entry page), then feeding either a null or the default for Record ID will generate a URL to that page.
- TabID (optional) – The GUID for a specific Tab to open. If a null or default are provided, it will go to the default (left most) tab for the user. The tabid may not be listed if you are looking at the leftmost (default) tab. if you don’t see the tabid data in the url, click on a tab farther to the right and then click back on the first tab. Since now it will not have been selected by default, the tabid should be listed in the url.
The easiest way to retrieve the PageID and TabID are to navigate to the target location through the Atlas interface and pull the information from the URL. For example, navigating to Helen’s record in the MGH database and selecting Revenue and Recognition → Revenue History, yields a URL of:
https://atlas.partners.org/CRM_Prod/webui/webshellpage.aspx?databasename=MGH#pageType=p&pageId=88159265-2b7e-4c7b-82a2-119d01ecd40f&tabId=d92685b8-752d-40a7-be79-60c6bd54d0c1&recordId=04a6617c-66f4-4ee2-a1f7-16a92854675b
Focusing in on the parameters:
&pageId=88159265-2b7e-4c7b-82a2-119d01ecd40f
&tabId=d92685b8-752d-40a7-be79-60c6bd54d0c1
&recordId=04a6617c-66f4-4ee2-a1f7-16a92854675b
So, I could use those parameters to create the following:
SELECT TOP 100
BBDW.PH_UFN_GETAPPLICATIONLINK
(‘88159265-2b7e-4c7b-82a2-119d01ecd40f’
, C.CONSTITUENTSYSTEMID
, ‘d92685b8-752d-40a7-be79-60c6bd54d0c1’) AS URL
FROM
BBDW.PH_CONSTITUENT AS C
You can then use those URLs to produce hyperlinks back to Atlas for use in SSRS (or any other reporting tool).