locked
Save crm form from inside iFrame RRS feed

  • Question

  • Hi, 

    I have an Iframe on account form, the iFrame is actually link to record of contact entity.

    So, I have a crm form with IFrame and inside that I have another crm form in the IFrame.

    On click of save button of contact entity i.e. inside IFrame, I want to save the account form. 

    I tried the following, but in all the cases data is null. I have set "Restrict cross-frame scripting" to no.

    parent.Xrm.Page.data

    window.top.opener.parent.Xrm.Page.data

    window.parent.Xrm.Page.data

    Is there any way to achieve this? Appreciate your help.

    Thanks,

    Rohit

    Thursday, January 30, 2014 7:00 AM

All replies

  • Try this :

    window.parent.top.opener.Xrm.Page.data.entity.save();

    parent.window.Xrm.Page.data.entity.save();



    Hope this helps. If you get answer of your question, please mark the response as an answer and vote as helpful !!!
    Vikram Singh. !!!  My Blog


    • Edited by _Vikram Thursday, January 30, 2014 7:14 AM
    Thursday, January 30, 2014 7:05 AM
  • window.parent.top.opener.Xrm.Page.data is null :(
    Thursday, January 30, 2014 7:15 AM
  • try this :

    parent.window.Xrm.Page.data.entity.save();

    Hope this helps. If you get answer of your question, please mark the response as an answer and vote as helpful !!!
    Vikram Singh. !!!  My Blog

    Thursday, January 30, 2014 7:16 AM
  • parent.window.Xrm.Page.data is also null 
    Thursday, January 30, 2014 7:23 AM
  • Try this :( 

    document.parentWindow.parent.Xrm.Page.data.entity.save();


    Hope this helps. If you get answer of your question, please mark the response as an answer and vote as helpful !!!
    Vikram Singh. !!!  My Blog

    Thursday, January 30, 2014 7:30 AM
  • document.parentWindow.parent.Xrm.Page.data too is null
    Thursday, January 30, 2014 7:33 AM
  • use

    window.parent.Xrm.Page.data.entity.save();


    Hope this helps. ----------------------------------------------------------------------- Santosh Bhagat If this post answers your question, please click "Mark As Answer" on the post and "Vote as Helpful"

    Thursday, January 30, 2014 8:00 AM