Quantcast
Channel: Category Name
Viewing all articles
Browse latest Browse all 10804

Improvements on Person Type for Office Developer Tools for Visual Studio 2013- March 2014 Update (Rui Xie)

$
0
0

In this post, I’m going to introduce two scenarios now possible with the person type using the Office Developer Tools for Visual Studio 2013 – March 2014 Update. If you are unfamiliar with the person business type in Cloud Business Apps, team members Karol Zadora-Przylecki and Ravi Eda wrote an article on Using the Person Business Type.

Attaching to external data sources with person

Imagine the scenario Contoso Inc. has a SQL database that contains all their employee information. Using the latest Office Developer Tools for Visual Studio, they can connect the employees in the current database to their O365 profiles and get Lync presence, people picker, etc.

Suppose this is what the employee table in the database looks like:

emailDB

If the data sources have properties that logically represent people, like a property on the entity which could resolve to a person type (i.e. email address), we now support the SharePoint person type out of box so they can be displayed as an O365 Person.  At this time, we rely on the O365 tenant and do not support external contacts.

In this example, after attaching to the existing database, the Employee entity is shown like this in the Data Designer when we set the Email properties to be of type Person.

clip_image003

In the property grid for this entity's HTML Client view of the Data Designer, set the Summary property to be Email.

clip_image004

The summary property creates a summary control which used on the Screen Designer by default when you create a screen or drag and drop a related entity. Prior to March 2014 Office Tools update, the summary control always displayed the summary property as a text value ignoring the business type of the summary property. So if a summary property was of type Person and contained an Email address, only the email address string would show up. Now if the summary control is a Person type, application users will get the person viewer experience.

In the example, let's add a common screen set for this Employee entity. The browse screen looks like the following:

clip_image005

clip_image006

The properties of the underlying control are visible in the properties window. For the People viewer you get the option of choosing whether to display the Name only or the Name + Picture, as shown above.

After deploying the application, the summary property will be displayed with the default viewer control of the underlying semantic type.  This is the Person Viewer control for summary property of type Person in our example.

clip_image007

In addition, we now allow you to use the Person Viewer Control in the Screen Designer on any email property.  Below is a picture of all the available controls for a property of type email.

clip_image008

You no longer have to mark a property as being a Person to use the Person Viewer. While you won't get the full benefits of the Person Type,  like the APIs, you can at least get the benefit of using the Person Viewer Control easily.

Persons on attached SharePoint lists

Imagine Contoso Inc. is managing its hiring process through a SharePoint list. They have a Job Postings list that lists the title of job, hiring manager, etc. Contoso wants to create a Cloud Business App that can provide more sophisticated tools to manage the hiring process while continuing to use existing data stored in the SharePoint list. The app developers can use any person column on the SharePoint list and they will automatically light up as a person in the app.

Prior to March 2014 Update, all the columns of type Person in SharePoint are defined as UserInformationList but did not map to the Person type. So these fields did not have the People picker control. Now you can get the people picker control for all the SharePoint columns of type Person.

In this example, after attaching to the SharePoint Job Posting list, the Email / WorkEmail property in UserInformationList are automatically set to type Person and set as the summary property.

Prior to March 2014 Update,

clip_image010

Now the Email/WorkEmail property field type is a Person and the Summary Property is automatically set to Email/WorkEmail.

clip_image011

Let’s look at a common screen set for this SharePoint List entity. On the Add/Edit screen, the default control for Hiring Manager (of person type) was User Information List prior to March 2014 Update. Now it’s the Person Picker Control.

clip_image012

Prior to March 2014 Update

clip_image014

Now

Prior to March 2014 Update, only limited people is listed in the modal picker for a deployed application. Now the app shows People Picker instead of Modal Picker and the People Picker goes against all SharePoint User Store in O365, not just the ones in the UserInformationList.

clip_image016

Prior to March 2014 Update

clip_image018

Now

Wrap Up

We hope that you find the improvements to the Person Type useful in your CBA applications. Please note, to get the new behavior you will need to upgrade your existing projects created prior to having the Office Developer Tools for Visual Studio 2013 – March 2014 Update installed. To do this, right-click on your project and select “Upgrade”.

Thanks,

Rui Xie, Software Development Engineer in Test - Cloud Business Apps Team


Viewing all articles
Browse latest Browse all 10804

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>