Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
davisbizhq
Frequent Visitor

Cann't get set bookmark on load to work

I’m wondering if you have tried the new apply bookmark on load functionality described here. It seems like I’m doing everything right, but it isn’t clear to me what I have missed. I have a support ticket open. I upgraded powerbi.js to v2.5.1, and my attempt looks like this:

var config = {
type: ‘report’,
tokenType: models.TokenType.Embed,
accessToken: accessToken,
bookmark: {
name: ‘English’
},
embedUrl: embedUrl,
id: embedReportId,
settings: {
filterPaneEnabled: false,
navContentPaneEnabled: navContentState
},
permissions: models.Permissions.Read,
viewMode: models.ViewMode.View
};

 

Besides setting the bookmark property in the config variable, is there another step needed so that the bookmark is set upon load?

3 REPLIES 3
v-micsh-msft
Microsoft Employee
Microsoft Employee

Hi,

 

Do you get any response back from the support ticket?

 

Regards,

Michael

 

I got a couple of emails from the front-lines support engineer with links to basic material on bookmark configuration, etc.  Nothing pertinent to the functionality of setting a bookmark upon report load.  Nor to the issue of what I might be doing wrong if, after editing the embedding config according to the instructions, it doesn't work.

I was able to get this working by using the actual cryptic bookmark name (e.g., Bookmark241ced39794c3f29ad5b) instead of the display name (e.g., 'Spanish').  So the working config looks like this:

 

var config = {
type: 'report',
tokenType: models.TokenType.Embed,
accessToken: accessToken,
bookmark: {
name: 'Bookmark241ced39794c3f29ad5b'
},
embedUrl: embedUrl,
id: embedReportId,
settings: {
filterPaneEnabled: false,
navContentPaneEnabled: navContentState
},
permissions: models.Permissions.Read,
viewMode: models.ViewMode.View
};

 

To find out the bookmark name, I had to look at the layout file inside the PBIX archive.  Does anyone know of an easier way to find out the bookmark name?

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.

Top Solution Authors