Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi,
I was trying to get the bookmarks from an embedded report using bookmarksManager.getBookmarks() and it was giving me the error "Cannot read property 'getSdkBookmark' of undefined".
This is where it throws on the minified reportEmbed.min.js
t.prototype.getSdkBookmark = function(t) { var e = this; if (!t) return null; if (O.isBookmarkGroup(t)) return { name: t.name, displayName: t.displayName, children: _.map(t.children, function(t) { return e.getSdkBookmark(t) }) }; var n = { displayName: t.displayName, name: t.name, options: t.options, explorationState: E.serialize(t.explorationState) } , r = JSON.stringify(n) , o = jsCommon.GzipUtility.compress(r); return { name: t.name, displayName: t.displayName, state: o } }
It gets the list of childrens fine, but on trying to run getSdkBookmark on each child it throws saying the e is undefined.
At first I though it might have been something different with the newer version of powerbi.js but I found that the sample report works fine. So after more experimentation, I found that it was only happening to reports that have a nested bookmark.
Has anyone else had this problem? I cant replicate the problem on the embedded playground tool as they dont have any reports with nested bookmarks.
Please help.
Thank you in advance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.