locked
Embedding the History tab of the Contact form in the Information tab using IFRAME? RRS feed

  • Question

  • In the contact form, there are various items/links on the left hand navigation bar such as Information, Activities, History, etc.

     

    Is it possible to have the History section embedded in an IFrame that I have created in the Information section?  I was able to do this through JavaScript in a Case entity by doing this:

     

     

    document.all.IFRAME_HistoryFrame.src="/cs/cases/areas.aspx?oId=" + crmForm.ObjectId +
              "&oType=112&security=852023&tabSet=areaActivityHistory";

     

    The code would populate the History section into an IFRAME called HistoryFrame which was created in the Information section.

     

    I understand the code for the contacts entity would be different, but not sure exactly how to go about looking up the appropriate values.  Any comments / suggestions would be appreciated!

     

    Thanks,

     

    Stephen

    Friday, December 5, 2008 10:04 PM

Answers

  • Hi Stephen,

    Try following piece of code in onLoad event of contact form.

     


    Code Snippet

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

     

     

     

    Friday, December 5, 2008 11:43 PM
    Moderator

All replies

  • Hi Stephen,

    Try following piece of code in onLoad event of contact form.

     


    Code Snippet

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

     

     

     

    Friday, December 5, 2008 11:43 PM
    Moderator
  • Thanks very much for the solution!  Since this is generic it works in different places within CRM.

     

    Much appreciated.

     

     

    Stephen

    Monday, December 8, 2008 8:51 PM