1 Reply Latest reply: May 8, 2018 5:24 AM by Erik Wetterberg RSS

    Apply bookmark in mashup fails

    Sergey Biryuzov

      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/qlik-bookmark-interface…