All Collections
Vainu for CRM
Vainu View
Vainu View for Dynamics 365
Vainu View for Dynamics 365

Display Vainu company profiles in Dynamics with our iFrame solution.

Updated over a week ago

With the Vainu View iFrame solution, you can display Vainu company profiles in Dynamics.

Vainu View solution

  • makes Vainu's company profile data available to everyone working with customers and needs detailed company information daily, i.e., salespeople, account managers, customer service, and customer success teams.

  • brings ease in preparing for customer meetings and creating customer understanding.

How to embed Vainu View to MS Dynamics 365

You can embed Vainu's company profiles to Dynamics with iFrame by following these instructions.

These instructions provide one way to create and add the iFrame element. Conditional formatting is possible. Please keep in mind that the code is case-sensitive when editing the code.

  1. Start by adding an iFrame element. Go to Settings ➡️ Customizations and select" Customize the System".

Näyttökuva 2019-5-28 kello 14.34.53-1
Näyttökuva 2019-5-28 kello 14.35.09

2. From the left side, select Components ➡️ Entities ➡️ Account ➡️ Forms.
Double-click the Account on this list to add the element to the Accounts view.

screenshot

3. You can create a Column for Vainu View when you are in the Account View. Select Insert ➡️ One Column. The Column should be visible on the center of the page. Click on the empty section inside the new Column and on top Insert iFrame.

Näyttökuva 2019-5-28 kello 15.38.18

4. Give the IFRAME property a name you remember. In this example, it is called IFRAME_Vainu2. Add to the URL section about:blank. Make sure you don't have "Restrict cross-frame scripting" selected.

Näyttökuva 2019-10-18 kello 13.25.14


5. Add formatting settings as you prefer. Add Row layout to expand automatically. Enable scrolling for IFRAME.

Näyttökuva 2019-5-28 kello 14.38.44


6. Click on OK to save IFRAME. After you have saved IFRAME double click the Column again and you should see the events section. You should add a Form Library. Click the green plus icon to add new. Click "New" again, and the "Web resource: New" -window appears.

Näyttökuva 2019-5-28 kello 14.39.54


7. Create a name for the Web resource, add Display Name and Description. For Content select Script and Paste Script to Text Editor. Remember that the code is case-sensitive. Click on OK and Publish.

function changeURL(executionContext){var formContext = executionContext.getFormContext(); // get formContextvar business_id = formContext.getAttribute("accountnumber").getValue();var IFrame = formContext.ui.controls.get("IFRAME_Vainu2");var vainu_url = "https://app.vainu.io/embedded/" + business_id + "?showAll";IFrame.setSrc(vainu_url);} 
Näyttökuva 2019-10-9 kello 14.11.26

8. on the Lookup Records window Add the newly created resource and close this view.

Näyttökuva 2019-5-28 kello 14.47.12

9. When you have closed the Web resource window you should have the Events tab open. Scroll down to On Event Handlers section, press the green Add to add a Web resource. Create a New one. Select the correct library you just created and write the name of the function "changeURL" to the Function section. Select "Pass execution context as first parameter". Click OK ✅

Näyttökuva 2019-9-24 kello 13.55.03

10. Save and publish the changes.

The IFRAME src property can be modified dynamically by adding the business ID and country code to the URL as parameters. You can find Microsoft documentation >> here.

An Iframe element with Vainu View might look like the picture below:

Näyttökuva 2020-6-16 kello 13.58.06

Are you interested in using Vainu View with the API key? >> Read this article.

More info about iFrame elements on >> Vainu Developer Hub.

Should you need more information on our Vainu View solution, please chat with us or email at support@vainu.io, and we're happy to help you out!

Did this answer your question?