Click here to Skip to main content
15,913,361 members
Articles / Programming Languages / C#
Article

Show navigation bar item in IFrame in Microsoft CRM

Rate me:
Please Sign up or sign in to vote.
2.00/5 (2 votes)
21 Mar 2008Ms-PL1 min read 38.7K   8   3
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".

JavaScript
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)


Written By
Software Developer (Senior) Omerd Business Solutions
Turkey Turkey
Since 2005, I have experience in consulting, software development and project management for Microsoft Dynamics CRM 1.2, 3.0, 4.0 and 2011 versions.
Since 2008, I have experience in the software department manager.
I got the MVP (Most Valuable Professional) award from Microsoft since 2009. This award is given to exceptional technical community leaders who actively share their high quality, real world expertise with others. You can find more information about this award on this address : http://mvp.microsoft.com/en-us/mvp/Baris%20Kanlica-4025099
Digital Life Coach title is an award given by Bilkom that general distributor of Apple, Adobe, Graphisoft brands in Turkey. This award is given to people who are the highest level of knowledge on a certain proven leader and pioneer in the industry. My expertise as a Digital Life Coach, explain, teach and give necessary advice to the end user and companies how can be used effectively Microsoft products on Apple's hardware and operating systems (MacOS X and IOS)
http://www.cub-e.net is my technical website. My website is site has been approved as a Microsoft Dynamics Related Community. As such they have added link to my site on their Related Communities page. You can look at in http://community.dynamics.com/p/relatedcommunities.aspx#MsDynCRM
I given lectures about CRM topics at many universities and seminars in Turkey.
I'm an editor of the following Web Sites, www.yazgelistir.com, www.yazilimgunlugu.com and www.nedirtv.com

Specialties:

Develop Architecture in .NET (extend CRM and connect CRM with other systems)
Cloud Services (Windows Azure) Implementation and Support
Sales, Marketing and Service management
Loyalty programs develop and management
CRM consultancy and training
Social Networks for B2B and B2C

My Programing Skills:

C#, ASP.NET, Windows Forms, Web Services, Windows Services
SQL Server, SQL Reporting Services,
Web-based software development technologies (JavaScript, HTML, CSS, etc.)
Multi-tier architecture, obje

Comments and Discussions

 
GeneralOpenSource CRM & ERP : http://www.codeplex.com/workflowmagic Pin
workf16-Oct-08 4:36
workf16-Oct-08 4:36 
AnswerYes you are right it is a tab page name. Or more good a expression, it is a relationship. Pin
Baris KANLICA30-Dec-07 3:20
Baris KANLICA30-Dec-07 3:20 
GeneralSome missing information Pin
3sL26-Dec-07 23:38
3sL26-Dec-07 23:38 
Thanks for your article.
I missed some information. Where is areaActivityHistory comming from? Is it a tab, a section or the actual IFrame?
Also, it took me some time to figure out that areas.aspx is actually a CRM-page. I didn't know that. Better provide this information to the reader.
Btw, it is not working with me. I'm getting a nullreferenceexception.

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

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