Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
BenjaminGroff
Contributor III
Contributor III

Root API in Extension making app lose connection

Hello All!

I'm trying to make a new extension that allows us to actively monitor app reload times without needing to reload the app itself!

I'm attempting to do this using the "getAppList" method in the Root API: qlik.getAppList(callback, config)

BenjaminGroff_0-1695156471531.png

The same code snippet works in a mashup but when I try to use it in an extension it returns a result but throws the following error:

BenjaminGroff_1-1695156627801.png

From the documentation it looks like I should be able to use this method in an extension:

BenjaminGroff_2-1695156705936.png

Just curious is this method is incompatible with extensions or why the error is being thrown! Any insight would be greatly appreciated! Thank you in advance!

 

Labels (2)
1 Solution

Accepted Solutions
Aiham_Azmeh
Employee
Employee

Hi @BenjaminGroff ,

Within an extension, you don't need to initiate a new connection to Qlik Sense (this is what the config is for), removing the config should do the trick (...if I remember well).

Perhaps an even better solution is to use the global object under the currentApp:

const app = qlik.currApp();
app.global.getAppList(...);


I hope this helps, 

View solution in original post

2 Replies
Aiham_Azmeh
Employee
Employee

Hi @BenjaminGroff ,

Within an extension, you don't need to initiate a new connection to Qlik Sense (this is what the config is for), removing the config should do the trick (...if I remember well).

Perhaps an even better solution is to use the global object under the currentApp:

const app = qlik.currApp();
app.global.getAppList(...);


I hope this helps, 

BenjaminGroff
Contributor III
Contributor III
Author

The issue still persisted even after removing the config, but the second option you listed of using the global object under the currentApp worked!