Qlik Community

Qlik Sense Integration, Extensions, & APIs

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

mdbender
New Contributor II

Apply bookmark in mashup fails

Hi community!

I'm working on custom mashup witch contains several html-pages in menu. I need to save user selections when he goes to another html page, so I make bookmark:

$(document).ready(function() {

  var config = {

  host: window.location.hostname,

  prefix: "/",

  port: window.location.port,

  isSecure: true

  };

$('.menu a').on('click', function () {

  require(["js/qlik"], function(qlik) {

   var app = qlik.openApp('43a08992-ba42-408e-86d1-f1bc4700fdeb', config);

   app.bookmark.create('Test','Test bookmark','fMcJkH');

  });

  })

)}

This code create bookmark, so i can see in application.

When user  open selected html page the bookmark must apply and deleted as garbage.

var config = {

  host: window.location.hostname,

  prefix: "/",

  port: window.location.port,

  isSecure: true

  };

  require( ["js/qlik"], function ( qlik ) {

  var app = qlik.openApp('43a08992-ba42-408e-86d1-f1bc4700fdeb', config);

  app.bookmark.apply('fMcJkH');

  app.bookmark.remove('fMcJkH');

  });

But nothing happens. What I'am doing wrong?

Methods I take from https://help.qlik.com/en-US/sense-developer/September2017/Subsystems/APIs/Content/CapabilityAPIs/qli...

1 Reply
erik_wetterberg
Valued Contributor III

Re: Apply bookmark in mashup fails

Hi,

You might try waiting for bookmark apply before removing the bookmark:

app.bookmark.apply('fMcJkH').then(function(){

  app.bookmark.remove('fMcJkH');

});

If that does not help, check what happens on the web socket.

Erik Wetterberg

Erik Wetterberg
https://extendingqlik.upper88.com/
Community Browser