function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Cross talk between embedded VF page and parent Detail page

Hello, I tried for a long time to figure out how to update/refresh a parent detail record page after an embedded VF page was updated.  Apex associated with the embedded VF page can change field values on the parent detail record but it was virtually impossible to get the detail page to refresh so the user could see the new values without refreshing the entire browser window.

Dr. Paul Coleman recently blogged about the very solution I needed.  Not only does it refresh the parent but it also dynamically resizes the embedded VF page depending on how many records are being displayed on the VF page.  Very Cool! See it here:

I won't supply the entire code here but rather focus on my current problem.  The code works well when the user is in the standard SF interface.  But we have some users that are using the Service Console and the code doesn't work there.

The code uses Javascript to specifically address the iFrame where the embedded VF page resides.  When the page is rendered outside of the Service Console, the iFrame is named with the id of the VF Page so it's easy to getComponentByName() using the Id:

<iframe frameborder="no" height="600px" id="066800000006mxu" marginheight="0" marginwidth="0" name="066800000006mxu" scrolling="yes" title="CT_RMALineItems" width="100%"></iframe>

But when the page is rendered inside the console, the name is more complicated:

<iframe frameborder="no" height="600px" id="sc-evf-fdc3fddc-8e17-44f5-bc43-bed1a8a8ced4-066800000006mxu" marginheight="0" marginwidth="0" name="sc-evf-fdc3fddc-8e17-44f5-bc43-bed1a8a8ced4-066800000006mxu" scrolling="yes" title="CT_RMALineItems" width="100%"></iframe>

Does anyone know how this name is arrived at or how to figure it out so I can modify Dr. Coleman's code to work in the Service Console?

John T 4John T 4

Were you able to resolve how to retrieve the iFrame id for an inline visualforce page specifically in "Service Console". I was able to retrieve the id outside the console using the following, but same visualforce page inside the console has modified id that starts with "sc-evf" and its not getting retrieved.