Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

swapnil_kumbhar
New Contributor III

Qsock deleteConnection method : Not able to delete Qlik sense Desktop connection

Hi All,

I want delete data connection of app in Qlik sense Desktop. I am using qsock object for that. I have written following code to delete Data connection but no luck. Not getting any error but Data connection is also not deleted. i am missing something in passing parameters in deleteConnection method.

Code :

const qsocks = require('qsocks');

const connectionName = 'Test';

qsocks.Connect( {appname: connectionName } )

.then( global => {

    // Access to the global class

    // http://help.qlik.com/en-US/sense-developer/2.2/Subsystems/EngineAPI/Content/Classes/GlobalClass/Glob...

    return global.openDoc( connectionName )

          .then( app => {

               console.log('Deleting')

               return app.deleteConnection('1e9290c4-eb65-4b05-bce9-e21bdbb88dc1').then(function(reply) {

               console.log('Deleted: ' +reply)

          })

     })

     .then(() => {

             // Close our connection.

             return global.connection.close();

         })

         .catch( err => {

             console.log( err )

         })

})

.then(() => {

    console.log('Done!')

})

Please Help.

Thanks & Regards,

Swapnil

1 Solution

Accepted Solutions
erik_wetterberg
Honored Contributor

Re: Qsock deleteConnection method : Not able to delete Qlik sense Desktop connection

Try saving the app DoSave method ‒ Qlik Sense

Hope this helps

Erik Wetterberg

Erik Wetterberg
https://extendingqlik.upper88.com/
6 Replies
erik_wetterberg
Honored Contributor

Re: Qsock deleteConnection method : Not able to delete Qlik sense Desktop connection

Have you verified the connection ID? It looks too short in your example.

Hope this helps

Erik Wetterberg

Erik Wetterberg
https://extendingqlik.upper88.com/
swapnil_kumbhar
New Contributor III

Re: Qsock deleteConnection method : Not able to delete Qlik sense Desktop connection

Hi Erik,

Yes i have verified Connection ID from Qlik sense Dev Hub. It is correct.

Thanks & Regards,

Swapnil

erik_wetterberg
Honored Contributor

Re: Qsock deleteConnection method : Not able to delete Qlik sense Desktop connection

Try saving the app DoSave method ‒ Qlik Sense

Hope this helps

Erik Wetterberg

Erik Wetterberg
https://extendingqlik.upper88.com/
swapnil_kumbhar
New Contributor III

Re: Qsock deleteConnection method : Not able to delete Qlik sense Desktop connection

Hi Erik,

Thanks a Lot. its working fine now.

Thanks & Regards,

Swapnil

erik_wetterberg
Honored Contributor

Re: Qsock deleteConnection method : Not able to delete Qlik sense Desktop connection

Glad it helped. It's easy to forget about saving the appin desktop.

Erik Wetterberg

Erik Wetterberg
https://extendingqlik.upper88.com/
swapnil_kumbhar
New Contributor III

Re: Qsock deleteConnection method : Not able to delete Qlik sense Desktop connection

yes small things create big troubles.

Community Browser