none
Refresh CRM Form from IFRAME with Custom ASPX

    Question

  • Hi Guys,

    I have a WebPage in iframe, that uploadFiles and attach the file to the anotation associated to a entity, when the attach correct, i need to refresh the annotation to show the last file uploaded, the two resources are in the same page, in the same tab, How can accomplish this task?

    Thank You.

    José

    Friday, December 03, 2010 7:10 PM

Answers

  • You may be able to refresh the Notes from the entity form with the following script:

    var notesFrame = document.getElementById("notescontrol");
    notesFrame.src = notesFrame.src;
    

     


    Dave Berry - MVP Dynamics CRM - http:\\crmentropy.blogspot.com Please follow the forum guidelines when inquiring of the dedicated CRM community for assistance.
    • Marked as answer by Jose Abad Saturday, December 04, 2010 5:51 PM
    Saturday, December 04, 2010 5:46 PM
    Moderator

All replies

  • You may be able to refresh the Notes from the entity form with the following script:

    var notesFrame = document.getElementById("notescontrol");
    notesFrame.src = notesFrame.src;
    

     


    Dave Berry - MVP Dynamics CRM - http:\\crmentropy.blogspot.com Please follow the forum guidelines when inquiring of the dedicated CRM community for assistance.
    • Marked as answer by Jose Abad Saturday, December 04, 2010 5:51 PM
    Saturday, December 04, 2010 5:46 PM
    Moderator
  • You may be able to refresh the Notes from the entity form with the following script:

     

    var notesFrame = document.getElementById("notescontrol");
    
    notesFrame.src = notesFrame.src;
    
    

     

     


    Dave Berry - MVP Dynamics CRM - http:\\crmentropy.blogspot.com Please follow the forum guidelines when inquiring of the dedicated CRM community for assistance.


    Thank you for your response David, Now:

    This Script should be in form script??   or in the button of the aspx page, can you show me how implement it?

    Thanks David.

     

     

    Saturday, December 04, 2010 5:51 PM
  • That script works from the form itself.  If you want to call it from an embedded page in another Iframe, you'll need to be able to probe up through the form's DOM from the ASPX scripting.  Something like this:

    var notesFrame = window.opener.document.getElementById("notescontrol");
    notesFrame.src = notesFrame.src;
    
    


    Dave Berry - MVP Dynamics CRM - http:\\crmentropy.blogspot.com Please follow the forum guidelines when inquiring of the dedicated CRM community for assistance.
    Saturday, December 04, 2010 5:59 PM
    Moderator
  • Actually, from within an Iframe, you may want to use "top" instead of "opener".  I've had modal dialogs on the brain all morning.
    Dave Berry - MVP Dynamics CRM - http:\\crmentropy.blogspot.com Please follow the forum guidelines when inquiring of the dedicated CRM community for assistance.
    Saturday, December 04, 2010 7:00 PM
    Moderator