Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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);
}
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?
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?
I'm ashamed. Wrong appId.
Quick fix then 🙂