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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
catalin
Partner - Contributor III
Partner - Contributor III

QSCloud GenericObject in SDK returning null

Hello!

I don't really know what I am doing wrong here, but I'm getting a null when I try to get the layout of an object from a QSC app.

Any pointers would be appreciated.

 

 

const string objectId = "1fc6d4aa-63a3-4980-bebd-2c501e5ec7c6";
var location = QcsLocation.FromUri(url);
location.AsApiKey(key);
using (IApp app = location.App(appId))
{
    NxAppLayout appLayout = await app.GetAppLayoutAsync();
    using GenericObject genericObject = await app.GetGenericObjectAsync(objectId);
    GenericObjectLayout lay = await genericObject.Session.RetryOnAbort(genericObject.GetLayoutAsync);
}

 

 

 

 

Labels (2)
1 Solution

Accepted Solutions
Øystein_Kolsrud
Employee
Employee

That code works just fine for me. Are you sure the object id is correct and that it is really the id of a generic object?

View solution in original post

3 Replies
Øystein_Kolsrud
Employee
Employee

That code works just fine for me. Are you sure the object id is correct and that it is really the id of a generic object?

catalin
Partner - Contributor III
Partner - Contributor III
Author

I'm ashamed. Wrong appId. 

Øystein_Kolsrud
Employee
Employee

Quick fix then 🙂