Adding An I_Frame For An N:N Relationship

by Bill Owens 22. July 2008 00:17
by Danny Varghese 07.10.08

I've mentioned in a previous post how to add an I_Frame to a related entity: http://crowechizek.com/cs/blogs/crm/archive/2008/03/18/adding-an-i-frame-that-contains-a-view-of-related-entity.aspx.  The steps mentioned work for any entity that has a 1:N or N:1 relationship in both CRM 3.0 and now the new CRM 4.0 (Titan).  As you all know, Titan now has the ability to create N:N relationships!  With any new feature comes some new challenges, but not to worry, you can add an I_Frame for N:N related entities.  Thanks to a user who posted a comment on my blog article, I did a little digging and found that an additional parameter is needed in the url.


The additional parameter is shown in red and has been added to the original code from my other post:

 var urlAct = ""; urlAct =  "areas.aspx?oId=" + crmFormSubmit.crmFormSubmitId.value + "&oType=" + crmFormSubmit.crmFormSubmitObjectType.value + "&security=" + crmFormSubmit.crmFormSubmitSecurity.value +"&tabSet=areaActivityHistory" + "&roleOrd=2";document.getElementById('IFRAME_History').src = urlAct;

Although I don’t have confirmation of what this parameter is, I believe it may stand for "Role Ordinal."  If you look at the definition of the word "ordinal," it means to define the order or succession of something.  This parameter appears to define which side/order of the N:N relationship to display.  In the example above, the value is "2," which represents which side of the relationship you want to view.  So if you create an N:N relationship say from the Account entity, and you're asked to fill in the "Other Entity" section, that would represent the variable "2."  Another way to look at it is, if you're on the Account form, and you want to create an I_Frame pointing to the related entity of the N:N relationship, then the "roleOrd" is 2.  The best way to find the value of this parameter is if you view the source of the page you're on, do a find for "roleOrd," and see what the value is for the related entity.


Either way, I've seen this example work.  If anyone has any comments on this parameter, please do comment.  Thank you!

Tags: ,

CRM 4.0

Page List

About the author

I work for a consulting firm in Dublin Ohio called Affiliated Resource Group. For the last five years I have been spearheading our Microsoft Dynamics CRM practice. I have a deep appreciation for the Microsoft CRM platform and I am very excited about it. You might even describe me as a Microsoft CRM Advocate. I have many battle scars from my experience with the product and I’m constantly being asked questions about CRM and how-to-do something in it. Hence, this BLOG is to help disseminate that knowledge and information to everyone. As of last year I was posting links to many other blogs to help spread the knowledge, but now with the community.dynamics.com doing that for me, I will be following that practice unless a really juicy article catches my eye. Many people have asked where my post are for the first half of 2010, my company had me posting to another blog and maintain two was near impossible. I am now down to just this blog. So good luck and I hope that this blog may help in some way. If you have suggestions or questions, please email me them.

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2012 BillOnCRM