-
Notifications
You must be signed in to change notification settings - Fork 0
/
helpdesk.js
79 lines (76 loc) · 2.67 KB
/
helpdesk.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/*
* Helpdesk through Qlik Cloud Demo Mashup
* @qlik
*
*/
var config = {
host: 'ivanenterprise.eu.qlikcloud.com', //for example, 'abc.us.example.com'
prefix: '/',
port: 443,
isSecure: true,
webIntegrationId: 'WCrBay5HJqANA2G0O1bOIgGxNFiin6ox'
};
require.config( {
baseUrl: ( config.isSecure ? "https://" : "http://" ) + config.host + (config.port ? ":" + config.port : "") + config.prefix + "resources",
webIntegrationId: config.webIntegrationId
} );
require(["js/qlik"], function (qlik) {
qlik.on( "error", function ( error ) {
$( '#popupText' ).append( error.message + "<br>" );
$( '#popup' ).fadeIn( 1000 );
} );
$( "#closePopup" ).click( function () {
$( '#popup' ).hide();
} );
//open apps -- inserted here --
var app = qlik.openApp( 'dd7ad909-2b50-4ae9-8578-fcc46855c936', config ); //Replace 'AppId' with the actual helpdesk app ID
//get objects -- inserted here --
app.visualization.get('uETyGUP').then(function(vis){
vis.show("QV01");
} );
app.visualization.get('xfvKMP').then(function(vis){
vis.show("QV02");
} );
app.visualization.get('rJFbvG').then(function(vis){
vis.show("QV03");
} );
app.visualization.get('PAppmU').then(function(vis){
vis.show("QV04");
} );
app.visualization.get('ca4463f1-31fc-4eed-98a7-5e770b8387f3').then(function(vis){
vis.show("QV05");
} );
app.visualization.get('ff551649-420e-428d-bede-38accf80dce8').then(function(vis){
vis.show("QV06");
} );
//function to pre-select fields
function getCaseOwner(callback) {
// call some backend functionality and call the “callback” function when ready
callback("Thomas R. Allman");
}
//call getCaseOwner with callback function
getCaseOwner(function(caseOwner) {
app.field("Case Owner").selectMatch(caseOwner)
.then(function() {
//get objects -- inserted here --
app.visualization.get('uETyGUP').then(function(vis){
vis.show("QV01");
} );
app.visualization.get('xfvKMP').then(function(vis){
vis.show("QV02");
} );
app.visualization.get('rJFbvG').then(function(vis){
vis.show("QV03");
} );
app.visualization.get('PAppmU').then(function(vis){
vis.show("QV04");
} );
app.visualization.get('ca4463f1-31fc-4eed-98a7-5e770b8387f3').then(function(vis){
vis.show("QV05");
} );
app.visualization.get('ff551649-420e-428d-bede-38accf80dce8').then(function(vis){
vis.show("QV06");
} );
})
})
});