M3 ideas


Home | Pages | Archives


How to get the current username in a Mashup

December 15, 2011 1:49 pm

Here is the solution to get the current username in a Mashup in Lawson Smart Office. Last week I wrote a post on How to get the current M3 profile in a Mashup which returns DEV, EDU, TST, PRD, etc. depending on which profile you are currently connected. This week I post about the username:

  1. Add this namespace to the Mashup:
    xmlns:Services=”clr-namespace:Mango.Services;assembly=Mango.Core”
  2. Then get the UserName like this:
    <TextBlock DataContext=”{x:Static Services:ApplicationServices.UserContext}” Text=”{Binding UserName}” />
  3. There is also the DisplayName:
    <TextBlock DataContext=”{x:Static Services:ApplicationServices.UserContext}” Text=“{Binding DisplayName}” />

Here is a screenshot of the result:

I found inspiration from the Smart Office Developer’s Guide > UserAndProfileExample.js.

Posted by thibaudatwork

Categories: Infor Smart Office Mashups

Tags: ,

2 Responses to “How to get the current username in a Mashup”

  1. […] (DIVI), and Facility (FACI) in a Mashup in Lawson Smart Office. Last week I wrote a post on How to get the current username in a Mashup. This week I post about CONO, DIVI, […]

    Like

    By How to get CONO, DIVI, FACI in a Mashup « M3 ideas on December 19, 2011 at 10:15 am

  2. […] How to get the current username in a Mashup […]

    Like

    By Site map – M3 ideas on May 9, 2017 at 12:24 pm

Leave a Reply



Mobile Site | Full Site


Get a free blog at WordPress.com Theme: WordPress Mobile Edition by Alex King.