Scenario Overview
In this scenario our business requirement is to dynamically set an SSRS report (URL) which has been embedded onto the Account form via a IFrame. We need to pass in the current accounts guid into the URL so the correct SSRS report content is shown.
North52 Decision Suite Solution
The North52 Decision Suite solution works like this,
- We create a ClientSide formula that executes in the OnLoad() event of the Account form.
- The formula sets the URL of the IFrame so the current account guid is passed into the URL of the SSRS report
North52 Decision Suite Steps
The following set of steps
- Create a new formula of type 'ClientSide - Perform Action'
- Set the Event field to just 'Update'
- Set the Source Entity to 'Account'
- Set the Source Entity Property to 'OnLoad'
- Copy & paste the formula below into the formula description field
- Click Save & publish the formula (N52 Commands menu)
- You are now ready to test
Formula
SetIFrame('IFRAME_AccountOverview',
StringFormat('https://18102014.crm4.dynamics.com/crmreports/viewer/viewer.aspx?action=run&context=records&helpID=Account%20Overview.rdl&id=%7b4e96a0b2-8855-e411-a969-f0921c1074ec%7d&records=%7b{0}%7d&recordstype=1',
[account.accountid] )
)
How to add IFrame to a form.
Step 1: Insert the IFrame on the form
Step 2: Configure the IFrame on the form
Note 1 : if you are using CRM \ Dynamics 365 Online or are running under SSL for On-Premise then use https instead of http in the URL parameter in the screenshot above.