Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
marinab
Contributor
Contributor

How to get qliksense snapshot with Qliksense.netsdk 16.9.0

In previous version there was App.GetSnapshot(id). In newer version App.GetSnapshot(id) has been deprecated
I tried to get snapshot layout in different ways but none of them worked. I get either null or null reference exception
like:
var genericObjects = await app.GetAllInfosAsync();
foreach (var info in genericObjects)
{
       if (info.Type == "snapshot")
      {
            var sn1 = app.GetGenericObject(info.Id);   //returns null
            var sn2 = app.GetObjectAsync<GenericObject>(info.Id);
           if(sn1 != null)   //or sn2
          {
              var layout1 = await snt1.GetLayoutAsync();
              var json = layout.PrintStructure();
            }
     }
}

Labels (2)
1 Reply
Øystein_Kolsrud
Employee
Employee

If I remember correctly, snapshots are stored as bookmarks, not generic objects. So try this:

var sn1 = app.GetGenericBookmark(info.Id);