Re: Email address from SharePoint 'friendly name'

  •  04-09-2008, 11:40 AM

    • mgallen is not online. Last active: 06-05-2008, 12:41 PM mgallen
    • Top 25 Contributor
    • Joined on 01-15-2008
    • Melksham, Wiltshire, United Kingdom
    • Posts 121
    • Points 377

    Re: Email address from SharePoint 'friendly name'

    Hi David,

    Yes... there is a relatively simple solution. It involves making the use of the SharePoint ServiceObject instance.

    You can construct a SmartObject in such a way that one of its methods can be pointed to a service object instance. I can't remember the name of the SharePoint ServiceObject method in question at this time, but I think it was 'GetUser'.

    This method can take as an input parameter 'DOMAIN\User' and return you whatever you like, it is like an AD search.. You can retrieve, FirstName, LastName, email address etc.

    This is the easiest way of doing it, but bear in mind my blog post that explains the difficulty involved with using the SharePoint service object. http://blog.mgallen.com/?p=166 

    It will explain that K2 [blackpearl] references SharePoint instances by a GUID. If you attempt to deploy to another machine (using MSBUILD) with a different instance of SharePoint... you need to hack the .res files to modify the GUID inside them.

    Martin


    Martin Allen

    Visit my blog: SpittingCAML blog
    Filed under: , ,
View Complete Thread