Skip to Content
0
Dec 20, 2016 at 03:15 AM

bookmark in sap design studio

738 Views

Hello.

I'm learning use bookmark recently,but I have some problem now.

First,I found Bookmark.getAllBookmarks() just can get current version value,and everytime I change the application,I will miss all bookmark that I saved before;

Second,I use follow code to save bookmark in a folder,and everytime I enter the application,I will see the bookmark I saved lasttime,and if I changed the bookmark,it will save the last time version,and delete before version.So, it will just one bookmark in service.

//save bookmark
var text=INPUTFIELD_1.getValue();
if(bookid!=""){
Bookmark.deleteBookmark(bookid);
}
if(text!=""){
bookid=Bookmark.saveBookmark(text,"bo_admin520");
Bookmark.assignToFolder("FuzLV1jXrAUAkW4AAAA3OO8AAFBWi0ru", bookid);
}
//get bookmark,and display it
var con=Bookmark.getAllBookmarksByFolder("FuzLV1jXrAUAkW4AAAA3OO8AAFBWi0ru");
con.forEach(function(element, index) {
INPUTFIELD_1.setValue(element.text);
  bookid = element.id;
});

Everything work fine,but when I enter the CMC to see the bookmark,I found it don't remove to the folder I want.And if I remove the bookmark into the folder in CMC as picture one,it return error as picture two.

anyone can tell me why?

And how can I resolve above two problem?

Thanks.

Jing

Attachments