Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

Not applicable

Bookmarks using Mashup API

I am creating an ASP.NET MVC web application that needs to maintain selection state between visits and the plan was to use bookmarks to achieve this.

The application I am interacting with is published, and I am using the following code to create a bookmark and then save the application.

$('#createTileButton').click(function () {                    

     console.info('create tile clicked');                    

     app.bookmark.create('@Guid.NewGuid()', 'A custom tile with reference for \'@Model.TileRef\' for user \'@User.Identity.Name\'').then(function (bookmark) {                        

          //alert(bookmark.id);                        

          console.info('bookmark promise returned');                        

          $('#Bookmark').val(bookmark.id);                        

          app.doSave().then(function () {                            

               console.info('save promise returned');                        

          });                        

          $("form[name='custom-tile-form']").submit();                    

     });                    

     return false;                

});

The bookmark doesn't appear to be saving although I am getting a bookmark id returned. I did initially have the form submission with the callback of doSave() however it was never been called.

I am getting a variety of error messages however the app.doSave() tends to return an Error From Engine: with HTTP 403: Permission Denied error but no further details

Any ideas?

1 Solution

Accepted Solutions
Employee
Employee

Re: Bookmarks using Mashup API

Hey Daniel,

You don't need to persist your bookmarks with a app.dosave() actually if this is a published app then your users most likely aren't even allowed to persist changes to a app through doSave().

Your bookmark will be saved scoped to that user as a un-published bookmark. Also try saving your bookmark with a human readable name and not a guid as that may screw things up, strange I know

3 Replies
Employee
Employee

Re: Bookmarks using Mashup API

Hey Daniel,

You don't need to persist your bookmarks with a app.dosave() actually if this is a published app then your users most likely aren't even allowed to persist changes to a app through doSave().

Your bookmark will be saved scoped to that user as a un-published bookmark. Also try saving your bookmark with a human readable name and not a guid as that may screw things up, strange I know

Employee
Employee

Re: Bookmarks using Mashup API

Also the above answer assumes that you have a authenticated user. Anonymous users are not allowed to save bookmarks.

Not applicable

Re: Bookmarks using Mashup API

Hi Alex,

Yes I am using an authenticated user. I am not sure what has changed but it now seems to be persisting bookmarks without the save - I am sure I had tried this previously without luck but apparently I hadn't!

Even with the GUID as the name everything seems OK - it would be hard to give a truly unique human readable name within the context of the application.

Daniel

Community Browser