Click here to Skip to main content
Licence Ms-PL
First Posted 23 Dec 2007
Views 28,418
Bookmarked 8 times

Show navigation bar item in IFrame in Microsoft CRM

By | 21 Mar 2008 | Article
We don't make anything without Navigation Bar in CRM. In default, CRM haven't a setting about showing their pages in a IFrame. But we can change this event and we can more effective a usage area in CRM Form.

Introduction

We don't make anything without Navigation Bar in CRM. In default, CRM haven't a setting about showing their pages in a IFrame. But we can change this event and we can more effective a usage area in CRM Form. Specially sales persons don't want to click to lot of things and they want see the result of an action. So in this article we will learn how to show associated activities in centre of Contact card. We have a way that have two step. In first step, we will place a IFrame in Contact Card. In second step we will place a little JavaScript code for IFrame that we had placed. Let start;

a) IFrame :

"Settings" -> "Customizations" -> "Customize Entities" after this steps in CRM, we find the Contact card and we open this card. We select the "Forms and Views" in navigation bar at left and we clicked the Form.
Where you want place the your activities screen you select the interested tab and click the "Add IFrame" button. A window will be opened;

  1. set the Name "HistoryFrame",
  2. set the URL "about:blank",
  3. we check the "Pass record object-type code and unique identifier as parameters",
  4. we uncheck the "Restrict cross-frame scripting"

The first step will be completed when we press the "ok". Let the show second step;

b) JavaScript :

We click the "Form Properties" in same screen. We click the "OnLoad" on opened window. We replace the code that below. We click the buttons "ok" and "Save Form and Close".

function GetFrameSource(tabSet) 
{
    if (crmForm.ObjectId != null) 
    {
        var oId = crmForm.ObjectId;
        var oType = crmForm.ObjectTypeCode;
        var security = crmFormSubmit.crmFormSubmitSecurity.value;
        return "areas.aspx?oId=" + oId + "&oType=" + oType + "&security=" + security + "&tabSet=" + tabSet;
    }
    else 
    {
        return "about:blank";
    }
}

crmForm.all.IFRAME_HistoryFrame.src = GetFrameSource("areaActivityHistory");

We click to "Publish" that in the "actions" menu. We will see the activity history of contact when we open a contact card.

I hope it will done. Regards.

Baris KANLICA
Software Specialist

brsk@e-kolay.net
www.cub-e.net

forum.cub-e.net

License

This article, along with any associated source code and files, is licensed under The Microsoft Public License (Ms-PL)

About the Author

brsk

Software Developer (Senior)
Omerd Business Solutions
Turkey Turkey

Member

Currently, I work as a Software Departman Manager in OMERD Business Solutions and I am developing projects on Microsoft Dynamics CRM.
 
Besides making consultancy to companies, I make trainings based on C# and ASP.Net on CRM Projects, Windows Forums, Web and Windows services.
 
The result of work done in the CRM space Microsoft given to me the title of MVP and award.

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Layout  Per page   
  Refresh
GeneralOpenSource CRM & ERP : http://www.codeplex.com/workflowmagic Pinmemberworkf4:36 16 Oct '08  
AnswerYes you are right it is a tab page name. Or more good a expression, it is a relationship. Pinmemberbrsk3:20 30 Dec '07  
GeneralSome missing information PinmemberDries de Groot23:38 26 Dec '07  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web02 | 2.5.120517.1 | Last Updated 21 Mar 2008
Article Copyright 2007 by brsk
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid