08-13-2016 10:48 PM
Hi !
how can I extract user login ID and add it to the XML file in this function :
<script type="text/javascript">
// initialize the gadget running the init handler defined in EmbeddedWebApp.js
gadgets.HubSettings.onConnect = function () {
finesse.modules.EmbeddedWebAppGadget.init("http://webapp/ipcc/test.aspx?id="+user.getId());
};
</script>
Solved! Go to Solution.
08-15-2016 02:29 PM
Hi,
The user's id is in the finesse.gadget.Config. You cannot access the fields without initializing the ClientServices. If you do it in the .xml in the location you showed in your post, it would be something like this:
<script type="text/javascript">
// initialize the gadget running the init handler defined in EmbeddedWebApp.js
gadgets.HubSettings.onConnect = function () {
var cfg = finesse.gadget.Config;
finesse.clientservices.ClientServices.init(cfg, false);
finesse.modules.EmbeddedWebAppGadget.init("http://webapp/ipcc/test.aspx?id=" + cfg.id);
};
</script>
The other option is to pull the URL creation into the EmbeddedWebApp.js file itself and put the code in there (the code will be the same first two lines).
Thanx,
Denise
08-15-2016 02:29 PM
Hi,
The user's id is in the finesse.gadget.Config. You cannot access the fields without initializing the ClientServices. If you do it in the .xml in the location you showed in your post, it would be something like this:
<script type="text/javascript">
// initialize the gadget running the init handler defined in EmbeddedWebApp.js
gadgets.HubSettings.onConnect = function () {
var cfg = finesse.gadget.Config;
finesse.clientservices.ClientServices.init(cfg, false);
finesse.modules.EmbeddedWebAppGadget.init("http://webapp/ipcc/test.aspx?id=" + cfg.id);
};
</script>
The other option is to pull the URL creation into the EmbeddedWebApp.js file itself and put the code in there (the code will be the same first two lines).
Thanx,
Denise
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: