Dynamics CRM 4.0 IFrames

Can anyone tell me how to embed a view of associated cases to the accounts main form.
Also if i can do that is it possible to add edit delete from there too ?

Thanks in advance
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Feridun KadirPrincipal ConsultantCommented:
Have you reviewed this article?


you can go to Jim Wang's blog for the full javascript code ... all you need to do is to replace the name of the iframe and identify the id of the associated view. to identify the associated view just use the ie developer toolbar.

here is the link:
martin05Author Commented:
Great answers guys although I am having issues trying to find out what the Cases associated view is called !

Im not getting the tabset parameter /:(
OWASP: Threats Fundamentals

Learn the top ten threats that are present in modern web-application development and how to protect your business from them.

martin05Author Commented:
Just to be clear I need to show associated cases and activities against that case ,if anyone can check against their own systems it would be appreciated
tabset parameter  is nothing but the relationship name


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
martin05Author Commented:
I know between you ,I have the answer but im fecked if I can get it to work....
I must be thick lol....

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";

  // Waits for the content window of the IFrame to be ready
  function FixStylingInFrameSource(iframeID) {
      // Check the content window's ready state
      if (document.getElementById(iframeID).contentWindow.document.readyState
!= "complete") {
          // Re-run this function in 10 ticks
          window.setTimeout(function() { FixStylingInFrameSource(iframeID) }, 10);
      // Content window is ready
      else {
          // Change the background color
          document.getElementById(iframeID).contentWindow.document.body.style.backgroundColor = "#eef0f6";
          // Remove the left border
          document.getElementById(iframeID).contentWindow.document.body.all(0).style.borderLeftStyle = "none";
          // Remove padding
          document.getElementById(iframeID).contentWindow.document.body.all(0).all(0).all(0).all(0).style.padding = "0px";

          // Make the cell the full width of the IFRAME
         document.getElementById(iframeID).contentWindow.document.body.all(0).style.width = "102%"

          // Show the IFrame
          document.getElementById(iframeID).style.display = "block";

if(crmForm.FormType != 1)
  crmForm.all.IFRAME_Cases.src = GetFrameSource("account_as_customer_cases");
Feridun KadirPrincipal ConsultantCommented:
I've just used the javascript that you posted and it works on my test system with no change.  

All I had to do was add the script as an OnLoad event to Account (make sure that Event Enabled is ticked), add an IFRAME called IFRAME_Cases (this is case sensitive), publish the form and voila.

What results are you getting?
martin05Author Commented:
I think it must be something I have done I renamed customers to clients and was hoping to use it in there.
Still cant get it to work.....
Even if you have renamed your entity, the attribute name should still be the same. maybe you can post some screenshots for us so that we cna better visualize what your seeing?
martin05Author Commented:
Cheers Normanni,I wont be working on this for another couple of days I will get back to you with the screen shots.
and thanks for your effort so far
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Dynamics

From novice to tech pro — start learning today.