on 03-09-2018 9:53 AM
Hi,
I need to sync Microsoft outlook image with fiori launchpad user image in sap portal.
I am using Sap portal 7.5 version.
Thanks in Advance
Purushottam
Hi,
May I get any document on this, as this is very urgent.
Thanks in advance
Purushottam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Purushottam,
Do you have a service to supply the Microsoft Outlook image? You should be able to use this, with a Fiori Shell plugin to achieve the behaviour that you need. Some references:
Best regards,
Nick
Hi Purushottam,
A Fiori Plugin is configured via the Fiori Framework Page's Framework Page Configuration options. You would write your plugin to match your SAP Logged on user with the one referenced in the Outlook (probably via user id if they are the same in both applications).
Best regards,
Nick
Hi Meghal,
I have created the plugin with the name main.js and also uploaded in the Web resources repository and configured the Fiori Framework Page with Plugin Name and URL but I am getting the below error.
Can you please suggest about this error..
Plugin CustomBootstrapPlugin cannot get registered, because the module mechanism for plugins isnotvalid anymore. Plugins need to be defined as SAPUI5 components.-sap.ushell.services.PluginManager
Thanks in advance
Purushottam
Hi Meghal,
Thanks for the reply, I checked the syntax error and there is no error in our code but when I am configuring the Fiori Framework Page and reloading the FLP in portal the homepage is blank.
Custom SAPUI5 Module Plugin Name : main
Custom Plugin URL : resource_repository/FLP_Extension/main.js
Below is the code.
(function() {
"use strict";
/*global jQuery, sap */
jQuery.sap.declare("cis.FLPugin.Component");
jQuery.sap.require("sap.ui.core.Component");
jQuery.sap.require("sap.ffp.utils.ExtensionUtils");
var sComponentName = "cis.FLPugin";
// new Component
sap.ui.core.Component.extend("cis.FLPugin.Component", {
metadata: {
version: "@version@",
library: "sap.ushell.demo.UIPluginSampleAddHeaderItems"
},
_getRenderer: function() {
var that = this,
oDeferred = new jQuery.Deferred(),
oShellContainer,
oRenderer;
that._oShellContainer = jQuery.sap.getObject("sap.ushell.Container");
if (!that._oShellContainer) {
oDeferred.reject(
"Illegal state: shell container not available; this component must be executed in a unified shell runtime context.");
} else {
oRenderer = that._oShellContainer.getRenderer();
if (oRenderer) {
oDeferred.resolve(oRenderer);
} else {
// renderer not initialized yet, listen to rendererCreated event
that._onRendererCreated = function(oEvent) {
oRenderer = oEvent.getParameter("renderer");
if (oRenderer) {
oDeferred.resolve(oRenderer);
} else {
oDeferred.reject("Illegal state: shell renderer not available after recieving 'rendererLoaded' event.");
}
};
that._oShellContainer.attachRendererCreatedEvent(that._onRendererCreated);
}
}
return oDeferred.promise();
},
init: function() {
var that = this,fgetService = sap.ushell && sap.ushell.Container && sap.ushell.Container.getService;
this.oCrossAppNavigator = fgetService && fgetService("CrossApplicationNavigation");
sap.ffp.extensions.registerFFPExtension(sap.ffp.extensions.extensionTypes.CUSTOM_EP_RESOLVER, _getRenderer() );
this._getRenderer().fail(function(sErrorMessage) {
jQuery.sap.log.error(sErrorMessage, undefined, sComponentName);
})
.done(function(oRenderer) {
var imageSource = "https://outlook.office365.com/owa/service.svc/s/GetPersonaPhoto?email=" + sap.ushell.Container.getService("UserInfo").getUser().getEmail();
//Below is for the small icon on top left
$("#meAreaHeaderButton").html( "<img style='max-width: 100%; height:auto;' src=" + imageSource + ">" );
//Below is for the Me area
var biggerImage = imageSource + "&UA=0&size=HR96x96";
sap.ushell.Container.getService("UserInfo").getUser().setImage(biggerImage);
});
},
exit: function() {
if (this._oShellContainer && this._onRendererCreated) {
this._oShellContainer.detachRendererCreatedEvent(this._onRendererCreated);
}
}
});
})();
Can you please suggest.
Thanks & Regards
Purushottam
Hi Purushottam,
If possible could please try with one hardcoded image . so that we can check code is working or not ?
Regards,
Meghal Shah
Hi Nick,
I went through some document and get to know that first i need to upload created plugin(.js file) in web resource repository in sap portal then configure the Custom SAPUI5 Module Plugin Name and Custom Plugin URL in fiori framework page, but I am not sure what would be the correct Custom Plugin URL. I tried with the URL as suggested in the document
ie: /com.sap.portal.resourcerepository/repo/FLP_Extension/Main1/
But not able to fetch the image in FLP. I also tried with fixed image in the code but still not able to do that.Please suggest me if I am doing anything wrong.
Thanks & Regards
Purushottam
Hi Purushottam,
You should see the plugin .js get loaded in the Network trace/Console in FFP. Add some logging in your code to debug it if it not working.
You can use ?sap-ui-debug=true (i.e append parameter to URL) which will force FLP to load debug/non-minified system resources which will help you debug UI5/Fiori apps maybe easier.
Best regards,
Nick
Hi Nick,
Thanks for the reply
As per trace, plugin.js is getting loaded in FFP. but it is not working.
Attached screenshot is the trace of Network.
Plugin Name is: Main1.js
Thanks & Regards
Purushottam
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.