2016 iFrame Not running Parent Script RRS feed

  • Question

  • I have an iFrame on the contact that has a button to run a script from the parent form. It works on 2011 but when I put it in 2016 I get Object doesn't support property or method.

    I have tried prefacing the function with parent , window, parent.window and window.parent. I have also added window. to the function on the parent form. 

    I have tested in 2015 and it seems to work there as well.

    Does 2016 handle iframes in a different manner?


    Wednesday, September 28, 2016 2:13 PM


  • I found the solution so here it is for anyone else that may run into this.

    In the parent script define the function like this

    window.parent.parentscript = function() {

    In the iframe you refer to the function like this


    Apparently CRM 2016 loads iframes more then 1 level deep.

    • Marked as answer by bbuchanan Wednesday, September 28, 2016 2:53 PM
    Wednesday, September 28, 2016 2:53 PM