Skip to Content
0

How to Sync Microsoft outlook user image with fiori launchpad in sap portal.

Mar 09 at 09:53 AM

163

avatar image
Former Member

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

avatar image
Former Member Mar 26 at 09:53 AM
0

Hi,

May I get any document on this, as this is very urgent.

Thanks in advance

Purushottam

Show 12 Share
10 |10000 characters needed characters left characters exceeded

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

0
Former Member
Nick Rankin

Hi Nick,

Thanks for the reply.

I went through the documents but i am not able to understand where i need to develop the plugin and how this plugin can be used in user role.

Thanks

Purushottam

0

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

0
Former Member
Nick Rankin

Hi Nick,

Can you please suggest that how can we configure the Plugin in Fiori Framework Page in Sap Portal.

Thanks & Regards

Purushottam

0
Former Member
Nick Rankin

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

0

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

0
Former Member
Nick Rankin

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

plugin.png

Thanks & Regards

Purushottam


plugin.png (22.0 kB)
0

Hi Purushottam,

You need to create one sapui5 project with just component.js file and add plugin-code. Now upload that file same as sapui5 application process. Test your application.

Regards,

Meghal Shah

0
Former Member
MEGHAL SHAH

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

0

Hi Purushottam,

you can ignore that message. make sure there is no syntax error in the component.js.(according to me syntax error is creating the issue )

Regards,

Meghal Shah

0
Former Member
MEGHAL SHAH

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

0
Show more comments