El monstruito no soy yo, es el SharePoint

El Blog de Luis Mañez, dedicado a tecnologías MS, principalmente SharePoint y Office 365
Using the OOB Taxonomy picker control just from JavaScript code in SharePoint Online

In this blog post I’m gonna show you how to use the OOB Taxonomy picker control without any server side control or code, just using JavaScript.

As you probably know, the Taxonomy picker control is the TaxonomyWebTaggingControl class, that looks like:

image image

However, all the core functionality of this control is actually done by JavaScript so, in some cases, can be useful how to reuse all of this functionality without any server side stuff, for example, imagine you can add a Taxonomy picker control using a Script editor web part, letting the user pick a Term and then execute some custom JS code.

If someone is curious, I got all this knowledge with some reflection from the TaxonomyWebTaggingControl class, and some hours reading a lot of JS code that SharePoint generates when you work with Taxonomy fields (no magic Smile)

First thing you need to know is that almos all of the Taxonomy picker control functionality is inside the Script “scriptforwebtaggingui.js”, and if you are working with Taxonomy, likely you’ll also need the file “sp.taxonomy.js”, so, ensure you have a reference to this files an option to this could be using the ScriptLink, if you can edit the MasterPage:

   1: <SharePoint:ScriptLink ID="ScriptLink2" name="scriptforwebtaggingui.js" OnDemand="true" runat="server" Localizable="false" />
   2: <SharePoint:ScriptLink ID="ScriptLink1" name="sp.taxonomy.js" OnDemand="true" runat="server" Localizable="false" />    

or, you can use the SP.SOD framework. Here is the JS code generated by the first ScriptLink above:

   1: RegisterSod("scriptforwebtaggingui.js", "https:\u002f\u002fcdn.sharepointonline.com\u002f10477\u002f_layouts\u002f15\u002f16.0.2930.1217\u002fscriptforwebtaggingui.js");
   2: RegisterSodDep("scriptforwebtaggingui.js", "sp.js");
   3: RegisterSodDep("scriptforwebtaggingui.js", "sp.ui.rte.js");
   4: RegisterSodDep("scriptforwebtaggingui.js", "scriptresources.resx");

From HTML code, the Taxonomy picker control needs 2 html tags:

  • One tag is a hidden tag, and will save the selected terms in the format: Label|Term_GUID;OtherLabel|TermGUID…
  • The other tag is a DIV container, where JS code will inject the control, the show picker image, autocomplete options, and so on
   1: <input name="countryTaxControl" type="hidden" id="countryTaxControl">
   2: <div id="countryTaxControlContent" class="ms-taxonomy ms-taxonomy-height ms-taxonomy-width"></div>  

Now, you need to Initialize the control from more JavaScript code. As you likely will need the Taxonomy JS code and a SharePoint context, this is a good way to ensure all the JS files needed are loaded first:

   1: SP.SOD.executeFunc('sp.js', 'SP.ClientContext', function () {
   2:     SP.SOD.executeFunc('sp.taxonomy.js', 'SP.Taxonomy.TaxonomySession', init);
   3: });

Then, in the Init function, let’s initialize the Taxonomy picker control:

   1: var tagUI = document.getElementById(taxControlContentId);
   2: if (tagUI) {
   3:     tagUI['InputFieldId'] = taxControlInputId;
   4:     tagUI['SspId'] = sspId;
   5:     tagUI['GroupId'] = '00000000-0000-0000-0000-000000000000';
   6:     tagUI['TermSetId'] = termSetId;
   7:     tagUI['AnchorId'] = '00000000-0000-0000-0000-000000000000';
   8:     tagUI['IsMulti'] = isMulti;
   9:     tagUI['AllowFillIn'] = false;
  10:     tagUI['WidthCSS'] = 'ms-taxonomy-width';
  11:     tagUI['JavascriptOnValidation'] = "";
  12:     tagUI['Lcid'] = 1033;
  13:     tagUI['IsSpanTermSets'] = false;
  14:     tagUI['IsSpanTermStores'] = false;
  15:     tagUI['IsIgnoreFormatting'] = false;
  16:     tagUI['IsIncludeDeprecated'] = false;
  17:     tagUI['IsIncludeUnavailable'] = false;
  18:     tagUI['IsIncludeTermSetName'] = false;
  19:     tagUI['IsAddTerms'] = false;
  20:     tagUI['IsIncludePathData'] = false;
  21:     tagUI['IsUseCommaAsDelimiter'] = true;
  22:     tagUI['Disable'] = false;
  23:     tagUI['ExcludeKeyword'] = false;
  24:     tagUI['WebServiceUrl'] = _spPageContextInfo.webServerRelativeUrl + '\u002f_vti_bin\u002fTaxonomyInternalService.json';
  25:     tagUI['FieldName'] = fieldName;
  26:     tagUI['FieldId'] = '00000000-0000-0000-0000-000000000000';
  27:     tagUI['DisplayPickerButton'] = showPickerButton;
  28:     var _emmTaggingLoadCall;
  29:     if (_emmTaggingLoadCall == null) {
  30:         _emmTaggingLoadCall = true;
  31:         SP.SOD.executeFunc('ScriptForWebTaggingUI.js', 'Microsoft.SharePoint.Taxonomy.ScriptForWebTaggingUI.taggingLoad',
  32:             function () {
  33:                 Microsoft.SharePoint.Taxonomy.ScriptForWebTaggingUI.resetEventsRegistered();
  34:             });
  35:     }
  36:     SP.SOD.executeFunc('ScriptForWebTaggingUI.js', 'Microsoft.SharePoint.Taxonomy.ScriptForWebTaggingUI.onLoad',
  37:         function () {
  38:             Microsoft.SharePoint.Taxonomy.ScriptForWebTaggingUI.onLoad(taxControlContentId);
  39:         });
  40: }

Most of the params are self-explained, and also are the same params in the TaxonomyWebTaggingControl class. Interesting params are:

  • taxControlContentId: this is the ID from the DIV container in the HTML I showed you above.
  • InputFieldId: ID of the Hidden control.
  • SspId: This is the TermStore ID. I’ll show you later how to get that ID from more JS code.
  • termSetId: Term set ID that you want to bind the control. You can get it using sp.taxonomy.js, for example, get the ID from the TermSet name.

Here is the code to get the Term Store ID (SspId):

   1: var context = new SP.ClientContext.get_current();
   2: var session = SP.Taxonomy.TaxonomySession.getTaxonomySession(context);
   3: var termStore = session.getDefaultSiteCollectionTermStore();        
   4:  
   5: context.load(session);
   6: context.load(termStore);
   7:  
   8: context.executeQueryAsync(
   9:     function () {
  10:         sspId = termStore.get_id();
  11:         sspId = sspId.toString();
  12:         //configure controls ...
  13:     },
  14:     function () {
  15:         console.log("Unable to access Managed Metadata Service.")
  16:     }
  17: );

Finally, let’s say you wanna set a value before loading the control, for example, you get the Field value or a User profile Taxonomy property, and you want to set the control with that value. In this case, you just have to set the Hidden control value, like:

   1: $("#regionTaxControl").val("SharePoint|123413456-aaaa-aa11-aa22-123456789012;Javascript|123413456-aaaa-aa11-aa22-123456789012");

You have to do that before configuring the control, before calling the:

   1: Microsoft.SharePoint.Taxonomy.ScriptForWebTaggingUI.onLoad(taxControlContentId);

and that’s all ! you will get all the Taxonomy picker functionality and styling (obviously, you have to manage what you wanna do with the selected values, the loading and saving functionality is not done by the control)

Last note

If you’re using SharePoint apps and want to use the Taxonomy picker, you can use the code from AMS Office code, where Richard diZerega has made a great job creating a JS control with almost same functionality that the OOB Taxonomy picker control.

Also, that code can be used inside SharePoint, as is using just jQuery and SP JSOM. I did it and worked fine. However, that control has some lacks comparing with the OOB, like for example, you can’t use the keyboard to select the Terms, only the mouse (users are use to type, use the arrows, and enter tab to select a Term). This can’t be done with the code sample (unless I did some wront, didn’t worked that way to me). Of course, this is some sample code, and you have the entire source to adapt it to your needs.

Hope it helps!

Luis Manez
@luismanez

Adding Windows Azure Active Directory to an existing ASP.NET app

If you want to secure your Azure ASP.NET app using Azure Active Directory, Visual Studio 2013 does a great job if you create a new one. Here you can find a good article about how to do it.

However, is not so easy and we don’t have too much help if we want to add Azure AD to an existing asp.net app. This post tries to help with that, basically, create a new project configured with Azure AD, and then follow the following steps using the new one as reference:

First you’ll need to add these packages to your project:

   1: <package id="EntityFramework" version="6.1.0" targetFramework="net45" />
   2: <package id="Microsoft.AspNet.Identity.Core" version="2.0.0" targetFramework="net45" />
   3: <package id="Microsoft.AspNet.Identity.EntityFramework" version="2.0.0" targetFramework="net45" />
   4: <package id="Microsoft.IdentityModel.Clients.ActiveDirectory" version="1.0.0" targetFramework="net45" />
   5: <package id="System.IdentityModel.Tokens.ValidatingIssuerNameRegistry" version="4.5.1" targetFramework="net45" />

Copy the Utils folder that contains the class DatabaseIssuerNameRegistry and the Models classes (see image below):

image

Note: You’ll need an SQL Database for the Authentication stuff. It seems that in recent versions, the identity providers are storing some info about tokens there. In this article from great Vittorio Bertocci there are more information: http://www.cloudidentity.com/blog/2013/10/24/vs2013-rtm-organizational-accounts-and-publishing-to-windows-azure-web-sites/

Copy IdentityConfig.cs to App_Start

clip_image001

Copy AccountController

clip_image002

In the global.asax file:

Copy the method: WSFederationAuthenticationModule_RedirectingToIdentityProvider

In the Application_Start() add:

clip_image003

Copy the Account Views

clip_image004

Copy the Home/UserProfile view

clip_image005

Update the Home controller with the UserProfile action. You will see that you need to add some constants that are defined in the HomeController class

   1: [Authorize]        
   2: public async Task<ActionResult> UserProfile()
   3: {
   4:             string tenantId = ClaimsPrincipal.Current.FindFirst(TenantIdClaimType).Value;
   5:  
   6:             // Get a token for calling the Windows Azure Active Directory Graph
   7:             AuthenticationContext authContext = new AuthenticationContext(String.Format(CultureInfo.InvariantCulture, LoginUrl, tenantId));
   8:             ClientCredential credential = new ClientCredential(AppPrincipalId, AppKey);
   9:             AuthenticationResult assertionCredential = authContext.AcquireToken(GraphUrl, credential);
  10:             string authHeader = assertionCredential.CreateAuthorizationHeader();
  11:             string requestUrl = String.Format(
  12:                 CultureInfo.InvariantCulture,
  13:                 GraphUserUrl,
  14:                 HttpUtility.UrlEncode(tenantId),
  15:                 HttpUtility.UrlEncode(User.Identity.Name));
  16:  
  17:             HttpClient client = new HttpClient();
  18:             HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, requestUrl);
  19:             request.Headers.TryAddWithoutValidation("Authorization", authHeader);
  20:             HttpResponseMessage response = await client.SendAsync(request);
  21:             string responseString = await response.Content.ReadAsStringAsync();
  22:             UserProfile profile = JsonConvert.DeserializeObject<UserProfile>(responseString);
  23:  
  24:             return View(profile);
  25: }

Copy LoginPartial view

clip_image001[4]

Add this code to _Layout.cshtml file

clip_image002[4]

OK. Now you need to configure some bits in the Azure portal. Basically, what you need to do is adding permissions for your app in the Azure AD.

In Azure Management Portal, go to the Active Directory and Applications, and Add a new Application:

clip_image001[6]

image

image

The sign on URL is where your app will go when you navigate to your app without being logged in. Usually will be you same home page (has to be SSL)

The App ID URI has to be your Azure Active Directory URL, followed for some app name or ID. You can see your Azure AD URL managing your Azure AD in the Domains section. If you are in the Azure tenant for Office 365, the AD URL will be the same Office 365 main URL: https://tenant_name.sharepoint.com

Then, in the Configure page, you have to add a Key:

clip_image001[8]

Save the config and you'll see the Key value:

image

You also need to copy the Client ID

image

If you want to allow Read/Write Azure AD data, you need to configure permissions. If you have copy the HomeController as I told you before, the UserProfile action is trying to read the Active Directory, so, you need to give it permissions or you will get an error.

clip_image001[10]

We’re done with the Azure management portal, now, grab the Client ID and Key value, and come back to the asp.net project, let’s update the web.config file with all the Identity providers and config.

In ConfigSections:

   1: <section name="system.identityModel" type="System.IdentityModel.Configuration.SystemIdentityModelSection, System.IdentityModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
   2: <section name="system.identityModel.services" type="System.IdentityModel.Services.Configuration.SystemIdentityModelServicesSection, System.IdentityModel.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />

Add the ConnectionString. Here you can set a local DB value, and later, when you publish to Azure, Visual Studio will detect that you’re using a connection string, and will show you the assistant to connect to the SQL DB in Azure.

   1: <connectionStrings>
   2:   <add name="DefaultConnection" connectionString="Data Source=(LocalDb)\v11.0;AttachDbFilename=|DataDirectory|\aspnet-MyLocalDB-20140522115400.mdf;Initial Catalog=aspnet-MyLocalDB-20140522115400;Integrated Security=True" providerName="System.Data.SqlClient" />
   3: </connectionStrings>

Note: If you try to connect to Azure SQL DB from Visual Studio, you probably will need to configure the Allowed IP Addresses. You have more info in this article: http://azure.microsoft.com/en-us/documentation/articles/web-sites-dotnet-deploy-aspnet-mvc-app-membership-oauth-sql-database/

Add these AppSettings, review all the values that comes from the config you’ve done in Azure portal:

   1: <add key="ida:FederationMetadataLocation" value="https://login.windows.net/YOUR_Azure_AD_URL/FederationMetadata/2007-06/FederationMetadata.xml" />
   2: <add key="ida:Realm" value="APP ID URI created in Azure portal" />
   3: <add key="ida:AudienceUri" value="APP ID URI created in Azure portal" />
   4: <add key="ida:ClientID" value="12431234212342123412341243" />
   5: <add key="ida:Password" value="AKSHFD8943DRKSH8HKFD49" />

Add:

   1: <location path="Account">
   2:   <system.web>
   3:     <authorization>
   4:       <allow users="*" />
   5:     </authorization>
   6:   </system.web>
   7: </location>

Adding in System.Web

clip_image001[12]

Add (again, review all the values)

   1: <system.identityModel>
   2:   <identityConfiguration>
   3:     <issuerNameRegistry type="YOUR-PROJECT-NAMESPACE.Utils.DatabaseIssuerNameRegistry, NAMESPACE" />
   4:     <audienceUris>
   5:       <add value="SAME APP ID URI" />
   6:     </audienceUris>
   7:     <securityTokenHandlers>
   8:       <add type="System.IdentityModel.Services.Tokens.MachineKeySessionSecurityTokenHandler, System.IdentityModel.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
   9:       <remove type="System.IdentityModel.Tokens.SessionSecurityTokenHandler, System.IdentityModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
  10:     </securityTokenHandlers>
  11:     <certificateValidation certificateValidationMode="None" />
  12:   </identityConfiguration>
  13: </system.identityModel>
   1: <system.webServer>
   2:   <modules>
   3:     <add name="WSFederationAuthenticationModule" type="System.IdentityModel.Services.WSFederationAuthenticationModule, System.IdentityModel.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" preCondition="managedHandler" />
   4:     <add name="SessionAuthenticationModule" type="System.IdentityModel.Services.SessionAuthenticationModule, System.IdentityModel.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" preCondition="managedHandler" />
   5:   </modules>
   6: </system.webServer>
   1: <system.identityModel.services>
   2:   <federationConfiguration>
   3:     <cookieHandler requireSsl="true" />
   4:     <wsFederation passiveRedirectEnabled="true" issuer="https://login.windows.net/AZURE AD URL/wsfed" realm="APP ID URI" requireHttps="true" />
   5:   </federationConfiguration>
   6: </system.identityModel.services>

And that’s all !! remember to take care of all the URLs and IDs, but if you publish to Azure, you should get the Azure AD login page.

Extra ball !!

OK. You’ve done that, however, when you go to your home page, you find a redirect to the “old style” Forms authentication Login.aspx page… WTH !!

No panic, you’re not gonna believe the reason, but ensure you don’t have the WebMatrix.Data.dll in your BIN folder… yes! it’s true

image

I found the solution in this post:

http://blogs.catapultsystems.com/rhutton/archive/2012/07/20/mvc3-with-windows-authentication-redirected-to-accountlogin.aspx

Take care because you can remove the DLL from your project, but if it’s already in your Azure website, I suggest that you browse the BIN folder in the Azure site using Visual Studio Server explorer to ensure the DLL is not there (remove it manually if needed).

Hope it helps!!

Luis Manez
@luismanez

[Office 365] Selecting webpart title from Display Template

Let’s say we have a Search Results webpart showing latest 5 news with a wonderful Webpart title saying “News”. It would be pretty interesting that we can click on the webpart title and jump to a custom page that shows all the News article.

OK, SharePoint does a great job with Display templates, where you can control the chrome of all the results and each item, however the webpart title is not rendered directly by the Display template engine, so, if we want to modify the Webpart Title we’d need some jQuery magic from the Control display template.

image

We can use our custom Control Display template, and inside, we can select the Webpart title using jQuery. The selector we need looks like that:

   1: //
   2: var MainWebPartSelector = "#" + ctx.ClientControl.get_id();
   3: var titleElement = $($(MainWebPartSelector).parent().siblings().find("h2.ms-webpart-titleText span")[0]);
   4: //

That way, adding more jQuery we can replace the titleElement with all the html needed, like a link to the News page.

Hope it helps!

Luis Manez
@luismanez

European SharePoint Conference - I was there (and took some notes)

image

Just arrived from the European SharePoint Conference 14 in Barcelona. This has been my first SP European event and if I have to summarized in one word, would be “amazing”. First I've been able to chat again with some of the Spanish SharePointers that I din´t see for a while, and second, cos I could meet in person, some of the European SP rock stars!

The organisation has been quite good, the quality of the speakers, really good, and the sessions quite good, although we expected more in some sessions, that didn't´t include the last updates in their demos.

About the content, no new secrets, more on Office 365, more on Yammer, and more Apps, apps, apps. I´ve been pretty impressive that most of the demos were done using iPads, just highlighting the importance of the multi-device and mobile first for Microsoft.

Most of the speakers have available their presentations in their blogs, so, you can take a look to the sessions in the conference site, and look for their blogs.

I also found interesting that Microsoft is listening us. If you wanna say something about Office 365, this is the place: http://officespdev.uservoice.com/

Finally, just say thanks to my company, Content and Code, for let me attend the event, and last mention for my fellow Chris O’Brien, that was included, again, between the Top 25 European SharePoint Influencers. Congrats mate!!

Cheers.

[Office 365] Enable / Disable Feature from Power Shell using CSOM

Here we have 2 PowerShell scripts to Enable-Disable a feature using CSOM

Enable Feature
   1: ##########################################################################################
   2: #    Name:            Enable-SPOFeature
   3: #    Description:    This script enables a feature using CSOM
   4: #    Usage:            .\Enable-SPOFeature -User "name@server.onmicrosoft.com" -Password "Password" -Url "https://sposite.sharepoint.com/" -Feature "4aec7207-0d02-4f4f-aa07-b370199cd0c7" -Scope Site -Sandbox $true -Force $true
   5: #    Creator:        Luis Manez
   6: ##########################################################################################
   7:  
   8: param([string]$user, [string]$password, [string]$url, [string]$feature, [ValidateSet("Site","Web")][string]$scope, [bool]$sandbox, [bool]$force)
   9:  
  10: Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.dll" 
  11:  
  12: if ($user -eq "") {
  13:     Write-Host "User parameter not provided, exiting" -ForegroundColor Red
  14:     exit 1;
  15: }
  16: if ($password -eq "") {
  17:     Write-Host "Password parameter not provided, exiting" -ForegroundColor Red
  18:     exit 1;
  19: }
  20: if ($url -eq "") {
  21:     Write-Host "Url parameter not provided, exiting" -ForegroundColor Red
  22:     exit 1;
  23: }
  24: if ($feature -eq "") {
  25:     Write-Host "Feature parameter not provided, exiting" -ForegroundColor Red
  26:     exit 1;
  27: }
  28: if ($scope -eq "") {
  29:     Write-Host "Scope parameter not provided, exiting" -ForegroundColor Red
  30:     exit 1;
  31: }
  32: if ($sandbox -eq $null) {
  33:     Write-Host "Sanbox parameter not provided, exiting" -ForegroundColor Red
  34:     exit 1;
  35: }
  36: if ($force -eq $null) {
  37:     $force = $false;
  38: }
  39:  
  40: function GetClientContext($url, $user, $password) {
  41:  
  42:     $securePassword = ConvertTo-SecureString $password -AsPlainText -Force
  43:  
  44:     $context = New-Object Microsoft.SharePoint.Client.ClientContext($url) 
  45:     $credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($user, $securePassword) 
  46:     $context.Credentials = $credentials
  47:  
  48:     return $context
  49: }
  50:  
  51: # MAIN CODE
  52: #
  53:  
  54: $featureId = [GUID]($feature)
  55: $clientContext = GetClientContext $url $user $password
  56: write-host "Conected to SharePoint OK"
  57:  
  58: if ($scope.ToLower() -eq "web") {
  59:         $features = $clientContext.Web.Features
  60: }
  61: else {
  62:     $features = $clientContext.Site.Features
  63: }
  64:  
  65: $featureDefinitionScope = [Microsoft.SharePoint.Client.FeatureDefinitionScope]::Farm
  66: if ($sandbox) {
  67:     $featureDefinitionScope = [Microsoft.SharePoint.Client.FeatureDefinitionScope]::Site
  68: }
  69:  
  70: $clientContext.Load($features)
  71: $clientContext.ExecuteQuery()
  72:  
  73:  
  74: $features.Add($featureId, $force, $featureDefinitionScope)
  75: try {
  76:     $clientContext.ExecuteQuery()
  77:     write-host "Feature activated"
  78: }
  79: catch {
  80:     write-host "An error ocurred activating Feature. Error detail: $($_)"
  81: }
  • User: user in the Office 365 tenant
  • Password: user password
  • Url: Full URL to the site or web
  • Scope: Site / Web. Scope of the feature that we want to activate.
  • Feature: Feature Id.
  • Force: Re-enable feature if is already activated
  • Sandbox: true/false. Basically this param indicates if the solution where the feature lives, is a Farm solution, or a Sandbox solution.

About the Sandbox param. This is a little confuse if we take a look to the MSDN documentation
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.client.featurecollection.add.aspx

If we look at the FeatureDefinitionScope enum, we have:

   1: public enum FeatureDefinitionScope
   2: {
   3:     None,
   4:     Farm,
   5:     Site,
   6:     Web
   7: }

However, the documentation in the Add method says that you can only use 2 values: Farm and Site. This param can make you be wrong, because you can think that is the Scope of the feature, so, if you want to activate a Web scope feature, you’d try with the Web value in the enum type. However, this param indicates the scope of the Solution that contains the feature: Farm or Sandbox solution, so, the possible values are only Farm and Site.

Microsoft, Why are you using an Enum with 4 values in a function that only accept 2 possible values from the Enum ??? OK… that’s another question…

Let’s see now how we can use the same approach to Disable a Feature.

Disable Feature
   1: ##########################################################################################
   2: #    Name:            Disable-SPOFeature
   3: #    Description:    This script disables a feature using CSOM
   4: #    Usage:            .\Disable-SPOFeature -User "name@server.onmicrosoft.com" -Password "Password" -Url "https://sposite.sharepoint.com/" -Feature "4aec7207-0d02-4f4f-aa07-b370199cd0c7" -Scope Site
   5: #    Creator:        Luis Manez
   6: ##########################################################################################
   7:  
   8: param([string]$user, [string]$password, [string]$url, [string]$feature, [ValidateSet("Site","Web")][string]$scope)
   9:  
  10: Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.dll" 
  11:  
  12: if ($user -eq "") {
  13:     Write-Host "User parameter not provided, exiting" -ForegroundColor Red
  14:     exit 1;
  15: }
  16: if ($password -eq "") {
  17:     Write-Host "Password parameter not provided, exiting" -ForegroundColor Red
  18:     exit 1;
  19: }
  20: if ($url -eq "") {
  21:     Write-Host "Url parameter not provided, exiting" -ForegroundColor Red
  22:     exit 1;
  23: }
  24: if ($feature -eq "") {
  25:     Write-Host "Feature parameter not provided, exiting" -ForegroundColor Red
  26:     exit 1;
  27: }
  28: if ($scope -eq "") {
  29:     Write-Host "Scope parameter not provided, exiting" -ForegroundColor Red
  30:     exit 1;
  31: }
  32:  
  33: function GetClientContext($url, $user, $password) {
  34:  
  35:     $securePassword = ConvertTo-SecureString $password -AsPlainText -Force
  36:  
  37:     $context = New-Object Microsoft.SharePoint.Client.ClientContext($url) 
  38:     $credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($user, $securePassword) 
  39:     $context.Credentials = $credentials
  40:  
  41:     return $context
  42: }
  43:  
  44: # MAIN CODE
  45: #
  46:  
  47: $featureId = [GUID]($feature)
  48: $clientContext = GetClientContext $url $user $password
  49: write-host "Conected to SharePoint OK"
  50:  
  51: if ($scope.ToLower() -eq "web") {
  52:         $features = $clientContext.Web.Features
  53: }
  54: else {
  55:     $features = $clientContext.Site.Features
  56: }
  57:  
  58: $featureDefinitionScope = [Microsoft.SharePoint.Client.FeatureDefinitionScope]::Farm
  59: if ($sandbox) {
  60:     $featureDefinitionScope = [Microsoft.SharePoint.Client.FeatureDefinitionScope]::Site
  61: }
  62:  
  63: $clientContext.Load($features)
  64: $clientContext.ExecuteQuery()
  65:  
  66:  
  67: $features.Remove($featureId, $false)
  68: try {
  69:     $clientContext.ExecuteQuery()
  70:     write-host "Feature deactivated"
  71: }
  72: catch {
  73:     write-host "An error ocurred deactivating Feature. Error detail: $($_)"
  74: }

That’s all, hope it helps!!

Luis Manez
@luismanez

[Office 365] Using image renditions from Display Templates in SharePoint Online 2013

In this post I will show you how to use image renditions from a custom Display template. If you are new with Display temlates, I suggest you to read the following article from Chris O’Brien, and if you are starting with image renditions, this article from Waldek Mastykarz is perfect.

In this sample, I’m using a Search results webpart (not a CBSWP, that is not available on SharePoint Online), with a custom display template. The display template is configured with this Managed properties:

   1: ctx['DisplayTemplateData']['ManagedPropertyMapping'] = { 'Title': ['Title'], 
   2:     'Path': ['Path'], 'Description': ['Description'], 
   3:     'EditorOWSUSER': ['EditorOWSUSER'], 
   4:     'LastModifiedTime': ['LastModifiedTime'], 
   5:     'CollapsingStatus': ['CollapsingStatus'], 
   6:     'DocId': ['DocId'], 'HitHighlightedSummary': ['HitHighlightedSummary'], 
   7:     'HitHighlightedProperties': ['HitHighlightedProperties'], 
   8:     'FileExtension': ['FileExtension'], 
   9:     'ViewsLifeTime': ['ViewsLifeTime'], 'ParentLink': ['ParentLink'], 
  10:     'DisplayAuthor': ['DisplayAuthor'], 
  11:     'Picture URL': ['PublishingImage', 'PublishingRollupImage', 'Rollup Image'], 
  12:     'ArticleByLineOWSTEXT': ['ArticleByLineOWSTEXT'] };

If we want to get the value of a Managed property on the display template, we can do something like that (of course, the property has to be set on the display template first):

   1: ctx.CurrentItem.Path

or even something like that:

   1: ctx.CurrentItem["Path"]

but it’s a better option to use the following function:

   1: $getItemValue(ctx, "Picture URL")

with this function, we are getting a Srch.valueInfo object, that contains some interesting properties, as we can see in the next image:

clip_image001

  • value: the value of the property
  • isEmpty and isNull: quite useful to check if the property has a value
  • propertylookupName: this is the name of the slot that we are using to store the Managed property.
  • propertyMappings: and array with all the managed properties that we are including in the slot. As we can on the ManagedPropertyMapping array defined on the display template, the slot “Picture URL”, is mapped with 3 managed properties.
  • managedPropertyName: this is the managed property source of the value. In this case, we are mapping the slot with 3 properties, and the value is coming from the “PublishingImage” property.

with this object, we can use a SharePoint JS function to get the image URL with the rendition that we want to apply:

   1: var image = $getItemValue(ctx, "Picture URL");
   2: var imageUrlWithRendition = Srch.U.getImageSourceWithRendition(image, 190, 120)

This code will return the image URL with the width and height parameters:

image

Unfortunately, the SharePoint JSOM is almost undocumented on the MSDN, so, to find out this function and much more, I suggest you to take a look to all the OOB display templates, and use the Developer tools in Chrome to debug the client code and test the results of some functions.

With the value returned for the function, we can compose other IMG tag, and the result will be an image using the rendition that we want: 190x120.

Also, when you are working with display template, you will find useful to use the Diagnostic display template, which shows you all the managed properties used in the template, with its value and other information. This template is only available for the Content By Search webpart, but with a couple of changes, you can use the template in the Search Resutls webpart if you are working with SharePoint Online. This is the diagnostic template code for the Search Results WP

   1: function ULScqk(){var o=new Object;o.ULSTeamName="Search Server";o.ULSFileName="Item_Diagnostic.js";return o;}
   2: function DisplayTemplate_6be7c3604a7e4519a210e962b4ed867c(ctx) {ULScqk:;
   3:   var ms_outHtml=[];
   4:   var cachePreviousTemplateData = ctx['DisplayTemplateData'];
   5:   ctx['DisplayTemplateData'] = new Object();
   6:   DisplayTemplate_6be7c3604a7e4519a210e962b4ed867c.DisplayTemplateData = ctx['DisplayTemplateData'];
   7:  
   8:   ctx['DisplayTemplateData']['TemplateUrl']='~sitecollection\u002f_catalogs\u002fmasterpage\u002fDisplay Templates\u002fSearch\u002fItem_Diagnostic.js';
   9:   ctx['DisplayTemplateData']['TemplateType']='Item';
  10:   ctx['DisplayTemplateData']['TargetControlType']=['Content Web Parts'];
  11:   this.DisplayTemplateData = ctx['DisplayTemplateData'];
  12:  
  13:   ctx['DisplayTemplateData']['ManagedPropertyMapping']={'Picture URL':['PublishingImage', 'PictureURL', 'PictureThumbnailURL'], 'Path':null, 'SecondaryFileExtension':null, 'ContentTypeId':null, 'Line 1':['Title'], 'Line 2':['Description'], 'Line 3':['ArticleByLineOWSTEXT'], 'Line 4':[], 'Line 5':[], 'Line 6':[], 'Line 7':[], 'Line 8':[], 'Line 9':[], 'Line 10':[]};
  14:   var cachePreviousItemValuesFunction = ctx['ItemValues'];
  15:   ctx['ItemValues'] = function(slotOrPropName) {ULScqk:;
  16:     return Srch.ValueInfo.getCachedCtxItemValue(ctx, slotOrPropName)
  17: };
  18:  
  19: ms_outHtml.push('',''
  20: );
  21: var encodedId = $htmlEncode(ctx.ClientControl.get_nextUniqueId() + "_Diagnostic_");
  22:  
  23: var linkURL = $getItemValue(ctx, "Path");
  24: linkURL.overrideValueRenderer($urlHtmlEncode);
  25:  
  26: var line1 = $getItemValue(ctx, "Line 1");
  27: var pictureURL = $getItemValue(ctx, "Picture URL");
  28: pictureURL.overrideValueRenderer($urlHtmlEncode);
  29: var pictureId = encodedId + "picture";
  30: var pictureMarkup = pictureURL //Srch.ContentBySearch.getPictureMarkup(pictureURL, 100, 100, ctx.CurrentItem, "cbs-picture3LinesImg", line1, pictureId);
  31:  
  32: window.cbsDiagnostic_RenderPropertyMappings = function(valueInfoObj)
  33: {ULScqk:;
  34:     var combinedManagedPropertiesMapping = "";
  35:     if(!$isNull(valueInfoObj) && !$isNull(valueInfoObj.propertyMappings) && !$isNull(valueInfoObj.propertyMappings.length))
  36:     {
  37:         for (var i = 0; i < valueInfoObj.propertyMappings.length; i++)
  38:         {
  39:             var managedPropertyName = valueInfoObj.propertyMappings[i];
  40:             combinedManagedPropertiesMapping += i == 0 ? managedPropertyName : String.format(Srch.Res.edisc_MultiValueFormat, managedPropertyName);
  41:         }
  42:     }
  43:     return $htmlEncode(combinedManagedPropertiesMapping);
  44: }
  45:  
  46: var itemContainerTitle = null;
  47: var canBuildItemContainerTitle = !$isNull(ctx.CurrentItemIdx) && !$isNull(ctx.CurrentGroup) && 
  48:     !$isNull(ctx.CurrentGroup.ResultRows) && !$isNull(ctx.CurrentGroup.ResultRows.length) &&
  49:     !isNaN(ctx.CurrentGroup.ResultRows.length) && !isNaN(ctx.CurrentItemIdx);
  50: if(canBuildItemContainerTitle)
  51: {
  52:     itemContainerTitle = String.format($resource("item_Diagnostic_ItemTitleFormat"), ctx.CurrentItemIdx + 1, ctx.CurrentGroup.ResultRows.length);
  53: }
  54:  
  55: var containerId = encodedId + "container";
  56: var pictureSlotContainerId = encodedId + "pictureSlotContainer";
  57: var pictureContainerId = encodedId + "pictureContainer";
  58: var pictureLinkId = encodedId + "pictureLink";
  59: var pathContainerId = encodedId + "pathContainer";
  60: ms_outHtml.push(''
  61: ,'        <ul class="cbs-diagnostic-Container" id="', containerId ,'" data-displaytemplate="ItemDiagnostic">'
  62: ,'            <li>'
  63: );
  64: if(!$isEmptyString(itemContainerTitle))
  65: {
  66: ms_outHtml.push(''
  67: ,'                <h3 class="cbs-diagnostic-ContainerTitle">', $htmlEncode(itemContainerTitle) ,'</h3>'
  68: );
  69: }
  70: ms_outHtml.push(''
  71: ,'                <ul id="', pictureSlotContainerId ,'" class="cbs-diagnosticSlot">'
  72: ,'                    <li class="cbs-diagnosticSlotName">', $htmlEncode($resource("item_Diagnostic_PictureSlot")) ,'</li>'
  73: ,'                    <li class="cbs-diagnosticItemProperty">'
  74: ,'                        <ul class="cbs-diagnosticItemContainer">'
  75: ,'                            <li class="cbs-diagnosticItemName">', $htmlEncode($resource("item_Diagnostic_Value")) ,'</li>'
  76: );
  77: if(pictureURL.isEmpty)
  78: {
  79: ms_outHtml.push(''
  80: ,'                            <li class="cbs-diagnosticItemValue">&#160;</li>'
  81: );
  82: }
  83: else
  84: {
  85: ms_outHtml.push(''
  86: ,'                            <li class="cbs-diagnosticItemValue">', $htmlEncode(pictureURL.value) ,'</li>'
  87: );
  88: }
  89: ms_outHtml.push(''
  90: ,'                        </ul>'
  91: ,'                    </li>'
  92: ,'                    <li class="cbs-diagnosticItemProperty">'
  93: ,'                        <ul class="cbs-diagnosticItemContainer">'
  94: ,'                            <li class="cbs-diagnosticItemName">', $htmlEncode($resource("item_Diagnostic_Preview")) ,'</li>'
  95: ,'                            <li class="cbs-diagnosticItemValue">'
  96: ,'                                <div class="cbs-picture3LinesImageContainer" id="', pictureContainerId ,'">'
  97: ,'                                    <a class="cbs-pictureImgLink" href="', linkURL ,'" title="', line1 ,'" id="', pictureLinkId ,'">'
  98: ,'                                        ', pictureMarkup ,''
  99: ,'                                    </a>'
 100: ,'                                </div>'
 101: ,'                            </li>'
 102: ,'                        </ul>'
 103: ,'                    </li>'
 104: ,'                    <li class="cbs-diagnosticItemProperty">'
 105: ,'                        <ul class="cbs-diagnosticItemContainer">'
 106: ,'                            <li class="cbs-diagnosticItemName">', $htmlEncode($resource("item_Diagnostic_MappedManagedProperty")) ,'</li>'
 107: ,'                            <li class="cbs-diagnosticItemValue">', $htmlEncode(pictureURL.managedPropertyName) ,'</li>'
 108: ,'                        </ul>'
 109: ,'                    </li>'
 110: ,'                    <li class="cbs-diagnosticItemProperty">'
 111: ,'                        <ul class="cbs-diagnosticItemContainer">'
 112: ,'                            <li class="cbs-diagnosticItemName">', $htmlEncode($resource("item_Diagnostic_PropertyMappings")) ,'</li>'
 113: ,'                            <li class="cbs-diagnosticItemValue">', cbsDiagnostic_RenderPropertyMappings(pictureURL)  ,'</li>'
 114: ,'                        </ul>'
 115: ,'                    </li>'
 116: ,'                </ul>'
 117: ,'            </li>'
 118: ,'            <li>'
 119: ,'                <ul id="', pathContainerId ,'" class="cbs-diagnosticSlot">'
 120: ,'                    <li class="cbs-diagnosticSlotName">', $htmlEncode($resource("item_Diagnostic_PathSlot")) ,'</li>'
 121: ,'                    <li class="cbs-diagnosticItemProperty">'
 122: ,'                        <ul class="cbs-diagnosticItemContainer">'
 123: ,'                            <li class="cbs-diagnosticItemName">', $htmlEncode($resource("item_Diagnostic_Value")) ,'</li>'
 124: ,'                            <li class="cbs-diagnosticItemValue">', $htmlEncode(linkURL.value) ,'</li>'
 125: ,'                        </ul>'
 126: ,'                    </li>'
 127: ,'                </ul>'
 128: ,'            </li>'
 129: );
 130: for(var lineNum = 1; lineNum <= 10; lineNum++)
 131: {
 132:     var lineValueInfo = $getItemValue(ctx, String.format("Line {0}", lineNum));
 133:     if(!$isNull(lineValueInfo) && !$isEmptyString(cbsDiagnostic_RenderPropertyMappings(lineValueInfo)))
 134:     {
 135:         var lineId = String.format("{0}line{1}", encodedId, lineNum);
 136:         var slotName = String.format($resource("item_Diagnostic_SlotNameFormat"), lineNum);
 137: ms_outHtml.push(''
 138: ,'            <li>'
 139: ,'                <ul id="', lineId ,'" class="cbs-diagnosticSlot">'
 140: ,'                    <li class="cbs-diagnosticSlotName">', $htmlEncode(slotName) ,'</li>'
 141: ,'                    <li class="cbs-diagnosticItemProperty">'
 142: ,'                        <ul class="cbs-diagnosticItemContainer">'
 143: ,'                            <li class="cbs-diagnosticItemName">', $htmlEncode($resource("item_Diagnostic_Value")) ,'</li>'
 144: );
 145:         if(lineValueInfo.isEmpty)
 146:         {
 147: ms_outHtml.push(''
 148: ,'                            <li class="cbs-diagnosticItemValue">&#160;</li>'
 149: );
 150:         }
 151:         else
 152:         {
 153: ms_outHtml.push(''
 154: ,'                            <li class="cbs-diagnosticItemValue">', lineValueInfo ,'</li>'
 155: );
 156:         }
 157: ms_outHtml.push(''
 158: ,'                        </ul>'
 159: ,'                    </li>'
 160: ,'                    <li class="cbs-diagnosticItemProperty">'
 161: ,'                        <ul class="cbs-diagnosticItemContainer">'
 162: ,'                            <li class="cbs-diagnosticItemName">', $htmlEncode($resource("item_Diagnostic_MappedManagedProperty")) ,'</li>'
 163: ,'                            <li class="cbs-diagnosticItemValue">', $htmlEncode(lineValueInfo.managedPropertyName) ,'</li>'
 164: ,'                        </ul>'
 165: ,'                    </li>'
 166: ,'                    <li class="cbs-diagnosticItemProperty">'
 167: ,'                        <ul class="cbs-diagnosticItemContainer">'
 168: ,'                            <li class="cbs-diagnosticItemName">', $htmlEncode($resource("item_Diagnostic_PropertyMappings")) ,'</li>'
 169: ,'                            <li class="cbs-diagnosticItemValue">', cbsDiagnostic_RenderPropertyMappings(lineValueInfo)  ,'</li>'
 170: ,'                        </ul>'
 171: ,'                    </li>'
 172: ,'                </ul>'
 173: ,'            </li>'
 174: );
 175:     }
 176: }
 177: ms_outHtml.push(''
 178: ,'        </ul>'
 179: ,'    '
 180: );
 181:  
 182:   ctx['ItemValues'] = cachePreviousItemValuesFunction;
 183:   ctx['DisplayTemplateData'] = cachePreviousTemplateData;
 184:   return ms_outHtml.join('');
 185: }
 186: function RegisterTemplate_6be7c3604a7e4519a210e962b4ed867c() {ULScqk:;
 187:  
 188: if ("undefined" != typeof (Srch) &&"undefined" != typeof (Srch.U) &&typeof(Srch.U.registerRenderTemplateByName) == "function") {
 189:   Srch.U.registerRenderTemplateByName("Item_Diagnostic", DisplayTemplate_6be7c3604a7e4519a210e962b4ed867c);
 190: }
 191:  
 192: if ("undefined" != typeof (Srch) &&"undefined" != typeof (Srch.U) &&typeof(Srch.U.registerRenderTemplateByName) == "function") {
 193:   Srch.U.registerRenderTemplateByName("~sitecollection\u002f_catalogs\u002fmasterpage\u002fDisplay Templates\u002fSearch\u002fItem_Diagnostic.js", DisplayTemplate_6be7c3604a7e4519a210e962b4ed867c);
 194: }
 195:  
 196:         $includeLanguageScript("~sitecollection\u002f_catalogs\u002fmasterpage\u002fDisplay Templates\u002fSearch\u002fItem_Diagnostic.js", "~sitecollection/_catalogs/masterpage/Display Templates/Language Files/{Locale}/CustomStrings.js");
 197:  
 198: }
 199: RegisterTemplate_6be7c3604a7e4519a210e962b4ed867c();
 200: if (typeof(RegisterModuleInit) == "function" && typeof(Srch.U.replaceUrlTokens) == "function") {
 201:   RegisterModuleInit(Srch.U.replaceUrlTokens("~sitecollection\u002f_catalogs\u002fmasterpage\u002fDisplay Templates\u002fSearch\u002fItem_Diagnostic.js"), RegisterTemplate_6be7c3604a7e4519a210e962b4ed867c);
 202: }

And finally, if you are working with image renditions, you can provisioning your renditions using server side code, like Waldek shows in his article, and even tough I have not try it, it should work on sandbox, but also, you can do it declaratively, deploying the file “PublishingImageRenditions.xml” to the Master page gallery using a Module.

The “PublishingImageRenditions.xml” looks like that:

   1: <SiteImageRenditions xmlns="http://schemas.datacontract.org/2004/07/Microsoft.SharePoint.Publishing" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
   2:   <NextId>6</NextId>
   3:   <Renditions>
   4:    <ImageRendition>
   5:     <Height>120</Height>
   6:     <Id>5</Id>
   7:     <Name>My custom rendition</Name>
   8:     <Version>1</Version>
   9:     <Width>190</Width>
  10:    </ImageRendition>
  11:     <ImageRendition>
  12:       <Height>100</Height>
  13:       <Id>1</Id>
  14:       <Name>Display Template Picture 3 Lines</Name>
  15:       <Version>1</Version>
  16:       <Width>100</Width>
  17:     </ImageRendition>
  18:     <ImageRendition>
  19:       <Height>100</Height>
  20:       <Id>2</Id>
  21:       <Name>Display Template Picture On Top</Name>
  22:       <Version>1</Version>
  23:       <Width>304</Width>
  24:     </ImageRendition>
  25:     <ImageRendition>
  26:       <Height>220</Height>
  27:       <Id>3</Id>
  28:       <Name>Display Template Large Picture</Name>
  29:       <Version>1</Version>
  30:       <Width>468</Width>
  31:     </ImageRendition>
  32:     <ImageRendition>
  33:       <Height>68</Height>
  34:       <Id>4</Id>
  35:       <Name>Display Template Video</Name>
  36:       <Version>1</Version>
  37:       <Width>120</Width>
  38:     </ImageRendition>
  39:   </Renditions>
  40: </SiteImageRenditions>

My advice is that you create your image renditions using the User Interface, and then download the file and add it to your Visual Studio Module. If you edit the file manually, take care with the nodeNextId” !!

The module for the xml file would be:

   1: <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
   2:   <Module Name="MO_ImageRenditions" Url="_catalogs/masterpage" RootWebOnly="TRUE">
   3:     <File Path="MO_ImageRenditions\PublishingImageRenditions.xml" Url="PublishingImageRenditions.xml" Type="GhostableInLibrary" Level="Published" ReplaceContent="true">
   4:       <Property Name="ContentTypeId" Value="0x01010012BCF119622FF14793A8A38D5831F25C" />
   5:       <Property Name="ContentType" Value="Document" />
   6:     </File>
   7:   </Module>
   8: </Elements>

And that’s all, with this, your display template will show an image using the desired rendition.

Hope it helps, and let me know any comment.

Luis Manez
@luismanez

Deploying Managed Metadata Fields declaratively in SharePoint 2013 Online (Office 365)

In this article, we will see how we can deploy Managed metadata fields in a declarative way in SharePoint online, showing a new and different approach than in Farm solutions (the old way).

Basically this approach tries to cover the needed of deploying Managed metadata fields from a custom web template using a Sandbox solution. As you probably know, if you want to do this in a farm solution, you will find yourself following this post from Wictor Wilen (http://www.wictorwilen.se/Post/How-to-provision-SharePoint-2010-Managed-Metadata-columns.aspx). This is perfect for a Farm solution, but is not a valid approach for Sandbox solutions and Office 365 because the Microsoft.Sharepoint.Taxonomy.dll is not allowed. Apparently, the only option that we have is to create the Managed Metadata fields using the UI (or maybe some others imaginative solutions with remote events and client code), but if our solution is a custom web template that will be used to create new site collections, that means that the user has to create all the Managed metadata fields for every site collection... sounds not good!

However, Wictor shows us some interesting things about the Schema of a Managed metadata field, that we also see using SharePoint Manager from a Managed metadata field created from the SharePoint UI.

Here is the complete Schema XML of a Managed metadata field created manually:

   1: <?xml version="1.0" encoding="utf-8" ?>
   2: <Field Type="TaxonomyFieldType" 
   3:        DisplayName="LMLRoleSingleValue" 
   4:        List="{81bbf7e0-763f-4e61-98bc-5fd2c7e9c69c}" 
   5:        WebId="4a38c107-bf70-48fc-87b0-ae101d14c970" 
   6:        ShowField="Term1033" 
   7:        Required="FALSE" 
   8:        EnforceUniqueValues="FALSE" 
   9:        Group="LML" 
  10:        ID="{7baffc59-449d-4743-883b-0b92c5bdd4d6}" 
  11:        SourceID="{4a38c107-bf70-48fc-87b0-ae101d14c970}" 
  12:        StaticName="LMLRoleSingleValue" 
  13:        Name="LMLRoleSingleValue" 
  14:        Version="1">
  15:   <Default></Default>
  16:   <Customization>
  17:     <ArrayOfProperty>
  18:       <Property>
  19:         <Name>SspId</Name>
  20:         <Value xmlns:q1="http://www.w3.org/2001/XMLSchema" p4:type="q1:string" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">2567ccb0-68f2-46f6-8f4f-36b0bb507422</Value>
  21:       </Property>
  22:       <Property>
  23:         <Name>GroupId</Name>
  24:       </Property>
  25:       <Property>
  26:         <Name>TermSetId</Name>
  27:         <Value xmlns:q2="http://www.w3.org/2001/XMLSchema" p4:type="q2:string" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">2cd1c0fb-88af-4066-a4fc-4c9734160eb5</Value>
  28:       </Property>
  29:       <Property>
  30:         <Name>AnchorId</Name>
  31:         <Value xmlns:q3="http://www.w3.org/2001/XMLSchema" p4:type="q3:string" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">00000000-0000-0000-0000-000000000000</Value>
  32:       </Property>
  33:       <Property>
  34:         <Name>UserCreated</Name>
  35:         <Value xmlns:q4="http://www.w3.org/2001/XMLSchema" p4:type="q4:boolean" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">false</Value>
  36:       </Property>
  37:       <Property>
  38:         <Name>Open</Name>
  39:         <Value xmlns:q5="http://www.w3.org/2001/XMLSchema" p4:type="q5:boolean" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">false</Value>
  40:       </Property>
  41:       <Property>
  42:         <Name>TextField</Name>
  43:         <Value xmlns:q6="http://www.w3.org/2001/XMLSchema" p4:type="q6:string" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">{0ea51395-dcf0-4740-aa9f-2ab8e93bb798}</Value>
  44:       </Property>
  45:       <Property>
  46:         <Name>IsPathRendered</Name>
  47:         <Value xmlns:q7="http://www.w3.org/2001/XMLSchema" p4:type="q7:boolean" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">false</Value>
  48:       </Property>
  49:       <Property>
  50:         <Name>IsKeyword</Name>
  51:         <Value xmlns:q8="http://www.w3.org/2001/XMLSchema" p4:type="q8:boolean" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">false</Value>
  52:       </Property>
  53:       <Property>
  54:         <Name>TargetTemplate</Name>
  55:       </Property>
  56:       <Property>
  57:         <Name>CreateValuesInEditForm</Name>
  58:         <Value xmlns:q9="http://www.w3.org/2001/XMLSchema" p4:type="q9:boolean" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">false</Value>
  59:       </Property>
  60:       <Property>
  61:         <Name>FilterAssemblyStrongName</Name>
  62:         <Value xmlns:q10="http://www.w3.org/2001/XMLSchema" p4:type="q10:string" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">Microsoft.SharePoint.Taxonomy, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Value>
  63:       </Property>
  64:       <Property>
  65:         <Name>FilterClassName</Name>
  66:         <Value xmlns:q11="http://www.w3.org/2001/XMLSchema" p4:type="q11:string" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">Microsoft.SharePoint.Taxonomy.TaxonomyField</Value>
  67:       </Property>
  68:       <Property>
  69:         <Name>FilterMethodName</Name>
  70:         <Value xmlns:q12="http://www.w3.org/2001/XMLSchema" p4:type="q12:string" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">GetFilteringHtml</Value>
  71:       </Property>
  72:       <Property>
  73:         <Name>FilterJavascriptProperty</Name>
  74:         <Value xmlns:q13="http://www.w3.org/2001/XMLSchema" p4:type="q13:string" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">FilteringJavascript</Value>
  75:       </Property>
  76:     </ArrayOfProperty>
  77:   </Customization>
  78: </Field>

Let’s see the values that we need to focus on:

Key/Attribute

Description

ID

Any GUID

Type

TaxonomyFieldType (field with a single value)/ TaxonomyFieldTypeMulti (field with multiple terms)

Name

Name of the field

StaticName

Static name (usually the same as name)

DisplayName

Display name that will show in the UI

List

Value setted by SP when deploys the field. We can skip this attribute

WebId

Value setted by SP when deploys the field. We can skip this attribute

ShowField

Term1033 (Term + LCID that we are using)

Requiered

Mandatory field

EnforceUniqueValues

Only one list item with this value in the field?

Group

Group to show the field in the UI

SourceID

Value setted by SP when deploys the field. We can skip this attribute

Version

Value setted by SP when deploys the field. We can skip this attribute

SspId

GUID of the Managed Metadata Service Application

TermSetId

GUID of the TermSet you want to bind the field

Open

true/false (user can insert new values, only if the TermSet is defined as open)

TextField

GUID of the Hidden Note field

There are 3 values that we have no control over them:

· SspId: when you create an Office 365 tenant (you buy it), the Managed metadata service application is created with a name like: “Taxonomy_Zz2Z7zzzZzZzzzzZZzz2zz==” and a GUID. Obviously this value is different from each tenant y we don’t have any control on it.
We can see the GUID from the UI:

image

· TermSetId: This GUID is assigned when you create a new TermSet. If we create the TermSet manually, we can’t set this GUID. However, as we will see later, we can deploy our Term Store including TermSets and Term, specifying the GUID. So, let’s say that this value will be well-known for us.

· TextField: When SharePoint creates a MM field, actually is creating 2 fields, one is the MM field with the Schema showed above, but it creates a second Field of type Note, and a Hidden field. Again, using SharePoint Manager we can see a field, that usually has the same name as the MM field, but adding a “_0”

image


The Schema of the Hidden Note field is:

   1: <Field Type="Note"
   2:     DisplayName="LMLRole_0"
   3:     StaticName="d005416fced9454aaf7937757ad56c02"
   4:     Name="d005416fced9454aaf7937757ad56c02"
   5:     ID="{775a2c68-7660-42e5-890c-3cab91dbd88a}"
   6:     ShowInViewForms="FALSE"
   7:     Required="FALSE"
   8:     Hidden="TRUE"
   9:     CanToggleHidden="TRUE" />
  10:  

So we can deploy this hidden Note field in our sandbox solution, and that way, the TextField value will be a well-known value as well.

Note: When SharePoint deploys the Elements.xml file with our 2 fields: MM and Note field, it follows a sequential order, for this reason, is a requirement that the Note field is before in the Elements.xml than the Taxonomy field. If not, when SP create the Taxonomy field, he won’t find the TextField ID because is not provisioned yet. You won’t get an error, but SP will create its own Note field, and the Taxonomy field will not be mapped correctly.

The only field that we can’t assign by ourselves and will change from one Office 365 tenant to other is the SspId, but later will talk a little more about it.

Now, we are going to see how we can deploy our Taxonomy, and set fixed GUIDs for TermSets and Terms. To achieve this, I think the best approach is to write some CSOM code in a power shell script, which we will run as a part of the deployment. I usually work with a Taxonomy xml file created using the Power Shell commands from Gary Lapointe (http://blog.falchionconsulting.com/index.php/downloads/). That way, you can create all your taxonomy in your local environment, and later, export it to an XML file, that will be deployed in the Office 365 tenant using CSOM.

The next code is not complete but shows the path that you can follow to create TermSets and Terms using CSOM inside PowerShell:

# Get the password as a SecureString and load the client libraries

$securePassword = ConvertTo-SecureString $Password -AsPlainText -Force

Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.dll"

Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"

Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.Taxonomy.dll"

# Get the client context

$context = New-Object Microsoft.SharePoint.Client.ClientContext($url)

$credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($user, $securePassword)

$context.Credentials = $credentials

# Get the Taxonomy Session and first Term store

$taxonomySession = [Microsoft.SharePoint.Client.Taxonomy.TaxonomySession]::GetTaxonomySession($context);

$taxonomySession.UpdateCache();

$context.Load($taxonomySession);

$context.ExecuteQuery();

$termStores = $taxonomySession.TermStores

$context.Load($termStores)

$context.ExecuteQuery()

$termStore = $termStores[0]

$context.Load($termStore)

# Create a Group

$group = $termStore.CreateGroup($name, $groupGuid);

$context.Load($group);

$context.ExecuteQuery();

# Create a Term Set

$termSet = $group.CreateTermSet($name, $id, $termStore.DefaultLanguage);

# Create a Term

$term = $termSet.CreateTerm($name, $lcid, $id);

Well, as I said before, we still have a disadvantage. If we have different environments and Office 365 tenants (test, production…) we have to change manually the SspId before creating the WSP file in every Managed metadata field, which can be hard in some scenarios, but remember, in my opinion is still better than force the user to create all the Taxonomy fields manually on each site collection. Anyway, I’m so lucky for working with Chris O’brien who has solved this inconvenient using MSBuild, and I’m sure will blog about it very short. I will update this article linking Chris’ blog.

Hope it helps, and let me know any comment.

Luis Manez
@luismanez

I’m coming back …

Hola a todos,

No me enrollo mucho. La cosa es que se que he estado muy callado desde hace bastante, y voy a ver si hago algo mas de ruido por aqui. Eso si, os ruego me disculpes, pero los nuevos posts seran en Ingles (mas o menos ingles), ya que estoy trabajando en Londres (http://www.contentandcode.com/) y me viene mejor asi (de hecho no tengo letra “enye” ni acentos, y asi, no se puede…Smile). En cualquier caso, si algo no os queda claro, dejad un comentario y lo hablamos.

Saludos!

@luismanez

Posted: 27/8/2013 17:55 por Luis Mañez | con no comments
Archivado en:
SharePoint 2013 preview: Primeros libros disponibles en pre-order

Se me ha ocurrido lanzar una búsqueda rápida en Amazon sobre SharePoint 2013 y la verdad es que me ha sorprendido que ya aparecen los primeros 6 resultados con libros disponibles para pre-order. Curioso también las fechas previstas de publicación.

El primero que llegará, lo hará relativamente pronto, el 22 de Noviembre de este mismo año, y es de 2 de los grandes de Critical Path Training (nada de extrañar, teniendo en cuenta que han sido los encargados de hacer los videos de training de SP 2013).

image

La editorial Wrox, aparece también con sus clásicos Professional y Beggining SharePoint para finales de Febrero de 2013, que, de ser cierto, sería señal de que la versión final de SP 2013 andará por esas fechas.

image

El último que aparece de momento, también se espera para Marzo 2013, y está escrito por otro SharePoint MVP.

image

Y digo yo, ¿tendremos la suerte de contar con otro “SharePoint 2013 de Principio a Fin”? … ahí lo dejo Sonrisa

Saludos!!

Posted: 15/9/2012 19:08 por Luis Mañez | con 1 comment(s)
Archivado en:
SharePoint 2010: Propiedades de Lista ReadSecurity y WriteSecurity

En más de una ocasión he visto el requisito de que los items de una lista, o documentos de una biblioteca de documentos, sólo puedan ser editados por el mismo usuario que los creó, o por usuarios administradores, pero no puedan ser editados por otros usuarios contributors

Antes este requisito, más de una vez he visto soluciones que incluyen manejadores de eventos o workflows, que asignan permisos exclusivos a esos elementos.

Sin embargo, la mayor parte de las ocasiones, se puede solucionar con las propiedades del SPList ReadSecurity y WriteSecurity

Si ReadSecurity es igual a 2, los contributors, sólo pueden acceder a los items que han creado. Con valor 1, todos los usuarios tienen acceso de lectura.

Con WriteSecurity, podemos establecer el valor a 1, 2 ó 4. Dónde:

  • WriteSecurity = 1 : Todos los usuarios pueden modificar cualquier item
  • WriteSecurity = 2 : Los usuarios sólo pueden modificar los ítems que han creado
  • WriteSecurity = 4 : Los usuarios NO pueden modificar ningún item ya creado, sean ellos el creador, o no. Este valor suele tener sentido para listas que representan encuestas o similares.

Recordar que estas 2 propiedades no tienen efecto sobre usuarios administradores o propietario de la lista.

Saludos!!

Posted: 8/8/2012 17:29 por Luis Mañez | con no comments |
Archivado en:
SharePoint 2013 preview: publicados varios diagramas técnicos

Recientemente se ha ampliado la información disponible sobre SharePoint 2013 preview, con algunos diagramas técnicos.

Estos diagramas se agrupan en varias categorías:

  • Ejemplos de diseño
  • Arquitectura
  • Upgrade
  • Búsqueda
  • Apps
  • Backup y Recovery
  • Base de datos

Una documentación muy recomendable:

http://technet.microsoft.com/en-us/library/cc263199(v=office.15)

Corporate Portal Path-based Sites SharePoint 2013     Thumbnail of design sample
Posted: 29/7/2012 12:32 por Luis Mañez | con no comments
Archivado en:
SharePoint 2013 preview: Mejoras en Listas externas (Business Connectivity Services)

SharePoint 2013 introduce interesantes mejoras en el servicio de Conectividad de datos empresariales. Algunas de estas mejoras, relativa a listas externas son:

Mejoras a nivel de rendimiento

Se ha mejorado el rendimiento de listas externas gracias a un sistema externo, que se encarga de hacer el paginado, filtrado y ordenado de los datos de la listas externa, antes de que se envíen a SharePoint.

Límite en el número de registros devuelto por el sistema externo

Si se define un filtro de límite en el modelo del BDC, los usuarios pueden especificar el número de registros a retornar por página.

Filtros en datos

Los usuarios podemos filtrar datos externos a través de desplegables. Y los desarrolladores, podemos lanzar queries CAML para hacer filtrados sobre datos externos. Si el filtro de datos está definido en el modelo BDC, éste filtro se realiza en el sistema externo, con la consiguiente mejora de rendimiento que comentaba en el primer punto.

Exportar listas externas a Excel

Podemos exportar datos de listas externas e Excel 2010 y 2013 como si fuera cualquier lista nativa de SharePoint. Se exportan las columnas de la vista actual, y se hace en una única dirección, es decir, el usuario puede usar Excel para jugar con los datos, pero los cambios que haga, no se trasladan al sistema externo.

Si queremos saber más sobre estas mejoras en listas externas, y otras mejoras introducidas por el BCS, os recomiendo este artículo:

What's new for Business Connectivity Services in SharePoint 2013 Preview

Saludos!!

Posted: 28/7/2012 21:08 por Luis Mañez | con 1 comment(s)
Archivado en:
SharePoint 2013 preview: Image renditions

Esta nueva característica de SharePoint 2013 nos permite poder mostrar una misma imagen, en diferentes tamaños, según en qué página se muestra.

En este artículo vamos a ver cómo podemos configurarlo, y cuál es su cometido.

Para acceder a la configuración, lo haremos a través de las “Site settings”:

image

Una vez dentro, lo primero que nos llamará la atención es el mensaje de alerta que nos informa que debemos activar la Blob cache, antes de poder utilizar las Image renditions.

image

Aquí tenemos las instrucciones detalladas para activar la Blob Cache. Básicamente:

  1. Editar el web.config de nuestra aplicación web
  2. Localizar el nodo <BlobCache
  3. Edita el atributo Location a una ruta válida. Se recomienda que no esté en el mismo disco que el sistema operativo.
  4. Edita el atributo enabled a true.

Por ejemplo:

<BlobCache 
location="C:\BlobCache\15" 
path="\.(gif|jpg|jpeg|jpe|jfif|bmp|dib|tif|tiff|ico|png|
wdp|hdp|css|js|asf|avi|flv|m4v|mov|mp3|mp4|mpeg|mpg|rm|rmvb|wma|wmv
|ogg|ogv|oga|webm|xap)$" 
maxSize="10" 
enabled="true" />

Ojo con las extensiones, aseguraros que la extensión de vuestras imágenes está incluida, o incluirla vosotros.

Con esto, si volvemos a la pantalla de configuracion de Image Renditions, veremos que ha desaparecido el mensaje de alerta.

Vamos a crear un nuevo tamaño, por ejemplo, para las imágenes de "listados”, en modo thumbnail

image

Ahora vamos a crear una nueva página, e insertamos una nueva imagen en un campo de tipo imagen. Fijaros en que el formulario nos permite elegir la Image Renditions que hemos creado anteriormente

image

Si por el contrario, estamos insertando una imagen en un campo de texto enriquecido, en la Ribbon tenemos un botón para selecionar también el Image Rendition que queremos usar:

image

Si seleccionamos nuestro Thumbnail Image Rendition, y guardamos la página, tenemos:

image

Y si vemos las propiedades de la imagen desde el navegador, vemos como la anchura y altura es de 100px

image

Pero además, fijaros en la URL de la imagen. SharePoint le ha añadido la Query String RenditionID=5

Esta es otra forma de especificar el RenditionID, donde el ID es el ID que SharePoint le ha asignado cuando hemos creado la Image rendition, y que podemos ver en la página de configuración.

OJO, este parámetro sólo hace efecto si la imagen está dentro de SharePoint. No podemos pasar ese parámetro a una imagen de flikr, por ejemplo.

El atributo RenditionID también se puede utilizar en el makup de un “image field control” de nuestro PageLayout.

Sin duda, esta novedad nos facilita la vida a la hora de redimensionar nuestras imágenes, y nos ayuda a ahorrar disco, ya que no es necesario subir la misma imagen en n tamaños distintos.

Espero que os sirva.

Saludos!!

Posted: 24/7/2012 16:47 por Luis Mañez | con no comments
Archivado en: ,
SharePoint 2013 preview: HTML Field Security

Os traigo otra pequeña, pero interesante novedad en SharePoint 2013. Se trata de la opción de configuración del Site “HTML Field Security”

image

Desde esta opción, podemos configurar si queremos permitir que se inserte IFrames dentro de un campo de texto enriquecido. Podemos decir que SI, que NO, o que sí, pero solo cuando el iFrame apunte a un dominio dentro de una lista. Fijaros:

image

Espero que os sirva.

Saludos!

Posted: 23/7/2012 19:00 por Luis Mañez | con no comments
Archivado en:
SharePoint 2013 preview: Nueva plantilla “Community site”

En SharePoint 2013 tenemos disponible una nueva plantilla de sitio, llamada “Community site”. Esta plantilla está destinada a la creación de sitios de discusión sobre diferentes temas.

image

Toda la funcionalidad del site, viene a través de la Feature “Community site Feature”

image

Disponemos de los siguientes webparts específicos:

image

Y esta es la pinta que tiene una vez creado el site:

image

Como veis, el principal elemento de este site, es la lista de Discusiones, que contiene los “topics” con información sobre su estado, el autor, etc.

image

Además, tenemos una barra superior donde podemos filtrar las discusiones. A pesar de que para ese filtrado, se utilizan vistas sobre la lista, yo no he conseguido añadir una vista personalizada a esa barra. Lo que sí podemos hacer, es establecer nuestra vista personalizada, como la vista por defecto de la lista (desde la configuración del webpart de la lista).

De esta lista, podemos crear nuevos topics, o dar respuesta/comentar los topics existentes. También podemos usar el famoso “like” de las redes sociales o marcar una respuesta cómo “respuesta válida”

image

Los topics se asocian a una categoría. Dicha categoría se define en otra lista. Sólo se puede asociar a una categoría, sin embargo, al tratarse de una lista, podemos activar la característica de “Managed metadata and Enterprise Keywords”, y poder asignar múltiples “tags” a un topic.

Además de la lista de Discusiones, la plantilla incluye un webpart con accesos directos a las opciones de configuración más típicas del site:

image

También tenemos un resumen de la actividad del Site, y los usuarios que más contribuyen:

image

Desde la configuración, podemos definir, entre otras cosas, cuántos puntos otorgamos a un usuario, por realizar determinada acción:

image

Como vemos, con esta nueva plantilla y toda su funcionalidad, es bastante sencillo conseguir un típico portal de preguntas y respuestas estilo “2.0”. Sin embargo, sigo echando de menos algunas funcionalidades muy interesantes, como por ejemplo, que se puedan dar votos positvos/negativos a los topics, más facilidad para trabajar con metadatos y poder filtrar según esos metadatos, o que antes de crear un nuevo topic, se use el servicio de búsqueda para encontrar otros topics similares y evitar preguntas redundantes.

Para SharePoint 2010, tenemos un producto como RIVER, que sí que tiene todas estas características.

Espero que os sirva.

Saludos!!

Posted: 22/7/2012 9:35 por Luis Mañez | con no comments
Archivado en:
SharePoint 2013 preview: Insertando código embebido en nuestra página

Otra pequeña novedad que, pese al tamaño, para mi es bastante de agradecer, es la facilidad a lo hora de insertar código emebebido en el Page Content de nuestras páginas.

Si recordáis, en 2010, había que insertar un CEWP y hacer varios clicks sobre la Ribbon hasta que finalmente podías escribir tu código embebido.

Pues bien, ahora tenemos un nuevo botón en la ribbon, para ello:

image

image

image

Otra mejora Smile

Saludos!!

Posted: 21/7/2012 12:56 por Luis Mañez | con no comments
Archivado en:
SharePoint 2013 preview: “Term Property” Nuevo webpart

En el post anterior

SharePoint 2013 Preview: Novedades en el almacén de términos

vimos algunas novedades relacionadas con los Metadatos administrados. En este post, vamos a ver un nuevo webpart relacionado con esos metadatos. Se trata del Term Property Webpart, que tenemos dentro de la categoría Content Rollup

image

Como su propio nombre indica, este webpart, nos permite sacar información de un Term concreto.

Aquí vemos las opciones que tenemos:

image

Primero, podemos elegir entre un Term concreto, o el term que se está usando en el contexto de la página.

Luego tenemos las diferentes propiedades que podemos mostrar. Fijaros como tenemos la opción de elegir una Custom Property, que como os contaba en el post anterior, ahora podemos dar de alta y administrar de forma fácil, desde la propia herramienta del Almacén de términos.

Como veis, no están todas las propiedades del Term disponibles, y en concreto, hay una que me escuece que no salga. Se trata de la Category Image, que según vemos en la pantalla de administración del Term, sí debería poderse mostrar con el Term Property webpart:

image

No sé si me falta hacer algo más (que podría ser), o se trata de una funcionalidad no incluida en esta Preview.

Aún así, este webpart me parece de gran utilidad.

Espero que os sirva.

Saludos!!

SharePoint 2013 Preview: Novedades en el almacén de términos

Note: this article applies to SharePoint 2013 Preview (esto lo he visto hacer a los Masters de SP, así que me lo copio Smile)

Tal y como nos han contado ya Andrew Connell y Waldek Mastykarz, SharePoint 2013 nos trae bastantes novedades en la parte de WCM.

Algunas de esas novedades, tienen que ver con los Metadatos administrados. Os cuento algunas de las cosas que he visto hasta el momento.

Desde la herramienta de administración de términos, ahora podemos ver el GUID asignado a un item (TermGroup, TermSet, Term…)

image

Editor para las Custom Properties. En 2010, cada item del TermStore, tenía un objeto de tipo PropertyBag, que podíamos usar para propiedades personalizadas. En 2013, podemos editar esa bolsa desde la misma herramienta

image

Intended Use: Desde esta pestaña podemos hacer que los Términos aparezcan como items de navegación:

image

Al marcarlo para usar en la navegación, tendremos un nuevo menú de navegación en nuestro site:

image

Desde la configuración de la Navegación del site, podemos deefinir si queremos que se aplica a la Global Navigation y/o Current Navigation

image

Existen otras novedades que iremos viendo en otros artículos, de momento ya hemos hecho boca Smile

Y por poner un pero, echo de menos que sigamos sin poder Exportar nuestro Almacén de términos a un fichero con el mismo formato que luego usa la herramienta de Importación.

Espero que os sirva.

Saludos!!

Office 2013: Primeros post sobre la preview !!

Este post a la carrera es una recopilación inicial de los primeros posts escritos sobre Office 2013. Hace unos minutos que ha terminado la presentación de Steve Ballmer, y la red ya echa humo sobre la nueva versión de Office, que tiene muy buena pinta.

Algunos enlaces de interés:

Office Preview acaba de llegar…y no viene solo!

SharePoint 2013: Pre-requisitos de SW para su instalación!

Descargas de Office 2013

SharePoint 2013 - What you need to know

Understanding SharePoint 2013 Apps (aka: Apps 101)

SP2013 WCM: Forget Everything You Knew About SharePoint WCM!

Try it!!!

A disfrutar!!

Saludos.

SharePoint 2010: descripción y visio de las BDs de SP por versión

Si queréis tener claro qué BDs instala SharePoint, según la versión, además de qué recomendaciones seguir con cada BD (requerimientos de espacio, Read/Write, Backup, Recovery…), os recomiendo el siguiente enlace de Technet

Database types and descriptions (SharePoint Server 2010)

Ahí tendremos las BDs de SharePoint Foundation, Server Standar, Server Enterprise y Project Server.

De cada BD tenemos una tabla con las siguientes características:

image

Para completar la información, en este enlace tenemos un dibujo visio con todas las BDs, donde de forma gráfica podemos ver qué BDs componen cada versión, y una idea del tamaño de la misma.

Databases That Support SharePoint 2010 Products

image

La imagen es simplemente para que veáis si os interesa el recurso.

Espero que os sirva.

Saludos!!

Más artículos Página siguiente >