Forum Discussion
Pass value to the embedded app from custom visual
Tried, but not working. Is there any other solution? Is the sandboxed iframe blocking these events?
As far as I know, Power BI doesn't block such events since it's used for communication between main window and other custom visuals.
Can you share the code for furhter debugging?
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
- SolomoN-ua8 years agoRegular Visitor
Hi,
same problem here.
In the other thread (link), you were saying that PowerBI uses iframe sandbox, maybe that is why postMessage is not working?
Regards,
Anatoliy
- v-viig8 years agoCommunity Champion
Correct. Custom Visuals API loads visuals in an iframe.
Why do you want to use postMessage?
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
- aarshps8 years agoFrequent Visitor
Sorry for the late reply.
It is possible to achieve what I was trying to do. What I had in mind is I have a button on my Power BI report. When I click on the button, a popup appears in the application where my Power BI report is embedded. So I wanted the application to recieve an event trigger when the Power BI report button is pressed. This was achieved using a custom visual that I wrote. The visual simply passed a string value to the parent windows so that I was able to recieve the event.