3 Replies Latest reply: Jan 21, 2016 4:45 AM by Daniel Kay RSS

    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?