I am trying to use the await page.deleteVisual("8d0e01e7a860c2e5706d"); command when I layout a report page. This seems logical to me. I am going to place various visuals on the page for a certain group of people. For another group of people I will delete a few other visuals and keep this one. I get the following error:
TypeError: report.deleteVisual is not a function at changeLayout (PQLayout.js:56)
Most of the documentation pages are bare and lacking good examples, but this page doesn't help much for the error: https://docs.microsoft.com/en-us/javascript/api/overview/powerbi/remove-visual
Thanks