Tag Archives: Excellent SharePoint 2013 Hosting

SharePoint 2013 Hosting :: Duplicate Web Part Issue in SharePoint 2013

Today for something regarding one of the new features of SharePoint 13. There is the new attribute “ReplaceContent=TRUE” for the <File> element in <Module>.

Until SharePoint 2010, whenever we reactivate the PageLayout feature (the feature that provisions the page layouts in a master page gallery), web parts that have been added to the page layout are duplicated on the new page and we do not have a very standard solution to resolve this problem except for writing a feature receiver and removing the duplicated web parts.

ahp banner sharepoint-01
In SharePoint 2013 is the new attribute “ReplaceContent=TRUE” of the <File> element and if we use this when provisioning the page layout it overrides the existing web parts on the page layouts. So whenever we create a new page from the given page layouts, web parts are not duplicated.

    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">  
      <Module Name="MyPageLayouts" Url="_catalogs/masterpage" RootWebOnly="TRUE">  
        <File Path="MyPageLayouts\MyPageLayout.aspx" Url="MyPageLayouts.Intranet/MyPageLayout.aspx" Type="GhostableInLibrary" ReplaceContent="TRUE">       
    <!—- All our web parts goes here -->  
        </File>  
      </Module>

Have a look at the preceding example, I have set the ReplaceContent=”TRUE”. Because of this whenever I change, add or delete a web part in this elements.xml file and I need to reactivate the feature, the web parts on the page layouts are not duplicated but they do get overridden.

Other Usage example

I’ll like to share one more scenario related to this, I have a sandbox solution that I am deploying on Office 365. I was uploading my package file (.wsp) to the Solution Gallery and activating it. In my package I have one feature that is deploying my CSS file in the master page gallery since I do not have file system access. I had a change in CSS file, I did the change, packaged the solution, deactivated the solution first, uploaded it to the solution gallery and activated it. But my CSS changes are not reflected. Then I remembered the “ReplaceContent” attribute and I used it in the module element while provisioning the CSS file and wonder happened? It worked like a charm.

Feel free if you have some thoughts on this or please share your experience. Thanks :)

Best Recommended SharePoint 2013 Hosting

ASPHostPortal.com

ASPHostPortal.com is Perfect, suitable hosting plan for a starter in SharePoint. ASPHostPortal  the leading provider of Windows hosting and affordable SharePoint Hosting. ASPHostPortal proudly working to help grow the backbone of the Internet, the millions of individuals, families, micro-businesses, small business, and fledgling online businesses. ASPHostPortal has ability to support the latest Microsoft and ASP.NET technology, such as: WebMatrix, WebDeploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch, ASPHostPortal guarantees the highest quality product, top security, and unshakeable reliability, carefully chose high-quality servers, networking, and infrastructure equipment to ensure the utmost reliability

 

 

SharePoint 2013 Hosting :: How to integrate Microsoft Dynamics CRM 2015 as an External Content Type in SharePoint 2013

Open your SharePoint site in SharePoint Designer. Click on External Data Type. You will get the following message if the Business Data Connectivity (BDC) Service is not started on the SharePoint Farm.

SharePoint

Create a BDC Service, start it and again open the site in SharePoint designer.

BDC Service

Click on External Content Type (ECT) and choose to create a new ECT.

External Content Type

Provide a Name, Display Name, select the Item Type as Generic List and click on External System.

Item Type

You need to create a Data Connection. Click on Add Connection and choose SQL Server from the Data Source Type Selection drop down.

drop down

You will be asked the SQL Server name and authentication information.

connect with user

Specify these and click OK. I am choosing Connect with User’s identity, but an ideal way is to create a Secure Store Application ID in SharePoint and use it for this connection. If all goes well, you should be able to connect to CRM Tables, Views and Routines.
Views and Routines

The ideal way is to use Views for the read operation since we don’t want to directly use data from the tables. For this demo purpose I am choosing a view related to Contacts. Here is a reason why FilteredViews should be used.

FilteredViews

Follow the procedure to create this operation. First provide a name.

First give a name

Add Filter.

Add Filter

Choose the Columns.

Chose Columns

You can get an error as in the following if the threshold limit is exceeded.

exceeds

So select only columns that are really required.

really require

Click on Finish.

Similarly create a Read Item Operation.

Item Operation

Our ECT to CRM data is ready. Now we can test in designer if we can create a External List.
Click on “Create Lists and Forms” and enter the details.

Create Lists and Forms

Click OK. If all goes well, you will see the List created under Lists and Libraries.

Lists and Libraries

You will see the same in your SharePoint Site -> Site Contents.

Site Contents

Best Recommended SharePoint 2013 Hosting

ASPHostPortal.com

ASPHostPortal.com is Perfect, suitable hosting plan for a starter in SharePoint. ASPHostPortal  the leading provider of Windows hosting and affordable SharePoint Hosting. ASPHostPortal proudly working to help grow the backbone of the Internet, the millions of individuals, families, micro-businesses, small business, and fledgling online businesses. ASPHostPortal has ability to support the latest Microsoft and ASP.NET technology, such as: WebMatrix, WebDeploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch, ASPHostPortal guarantees the highest quality product, top security, and unshakeable reliability, carefully chose high-quality servers, networking, and infrastructure equipment to ensure the utmost reliability.

SharePoint 2013 Hosting – ASPHostPortal.com :: Deploy SharePoint 2013 Show Template via Visual Studio

We create more and more display templates as soon as we utilize Content By Search Webpart or Search Result Webpart in SharePoint 2013. The recent project that I’ve done includes authoring (internal) site and publishing (external) site through Cross Site Publishing. Since the publishing site is customer facing / external site, we use display templates heavily and I think we have around 90 display templates.

ahp banner sharepoint-01In this article, I would like to show you how to deploy them through Visual Studio. Without further ado, I want to show you my very basic display template:

<html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882">
<head>
    <title>My Custom Item Template</title>
 
    <!--[if gte mso 9]><xml>
    <mso:CustomDocumentProperties>
    <mso:TemplateHidden msdt:dt="string">0</mso:TemplateHidden>
    <mso:ManagedPropertyMapping msdt:dt="string">'Link URL'{Link URL}:'Path','Line 1'{Line 1}:'Title', 'ListItemID':'ListItemID', 'owstaxIdCNPKeywords':'owstaxIdCNPKeywords'</mso:ManagedPropertyMapping>
    <mso:MasterPageDescription msdt:dt="string">This Item Display Template will show a small thumbnail icon next to a hyperlink of the item title, with an additional line that is available for a custom managed property.</mso:MasterPageDescription>
    <mso:ContentTypeId msdt:dt="string">0x0101002039C03B61C64EC4A04F5361F385106603</mso:ContentTypeId>
    <mso:TargetControlType msdt:dt="string">;#Content Web Parts;#</mso:TargetControlType>
    <mso:HtmlDesignAssociated msdt:dt="string">1</mso:HtmlDesignAssociated>
    <mso:CrawlerXSLFile msdt:dt="string">/_catalogs/masterpage/MyDisplayTemplates/Server_MyItem.xsl, /_catalogs/masterpage/MyDisplayTemplates/Server_MyItem.xsl</mso:CrawlerXSLFile>
    </mso:CustomDocumentProperties>
    </xml><![endif]-->
</head>
 
<body>
    <div>
        <!--#_
                var title = $getItemValue(ctx, "Line 1");
                var itemURL = $getItemValue(ctx, "Link URL");
        _#-->
        <a class="mydiv" data-item="_#= $htmlEncode(itemURL) =#_">_#= $htmlEncode(title) =#_</a>
    </div>
</body>
</html>

As you noticed above, I’ve specified CrawlerXSLFile property. Basically this is required for Search Engine Optimization, to allow search crawler to crawl content inside your Content By Search Webpart/ Search Result Webpart. You could read great post from Waldek here. This is same thing like we did when we would like to customize Content Query Webpart in SharePoint 2010.

<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform' xmlns:ddwrt='http://schemas.microsoft.com/WebParts/v2/DataView/runtime'>
    <xsl:template match='/'>
        <xsl:apply-templates />
    </xsl:template>
 
    <xsl:template match='ResultTable'>
        <xsl:apply-templates select='Rows'/>
    </xsl:template>
 
    <xsl:template match='Rows'>
        <xsl:apply-templates select='Row' />
    </xsl:template>
 
    <xsl:template match='Row'>
        <xsl:for-each select='*'>
            <xsl:if test="name(.) = 'title'">
               <xsl:value-of select="." />
            </xsl:if>
        </xsl:for-each>
    </xsl:template>
</xsl:stylesheet>

Now, it come to the deployment part in Visual Studio. Below is the list of steps:
1. Open Visual Studio and Create SharePoint Empty Project as Farm Solution
2. Add New Module, called it DisplayTemplates
3. Add your .html and .xsl display templates into DisplayTemplates Module
4. Edit Elements.xml in DisplayTemplates module

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Module Name="DisplayTemplates" Url="_catalogs/masterPage">
    <File Path="DisplayTemplates\MyItem.html" Url="MyDisplayTemplates/MyItem.html" ReplaceContent="True" Type="GhostableInLibrary" Level="Published"/>
    <File Path="DisplayTemplates\Server_MyItem.xsl" Url="MyDisplayTemplates/Server_MyItem.xsl" Type="GhostableInLibrary" Level="Published" ReplaceContent="TRUE"  />
  </Module>
</Elements>

5. Ensure Display Template Module included in your Feature

1fbnytm6. Add Feature Receiver

using Microsoft.SharePoint;
using Microsoft.SharePoint.Administration;
using Microsoft.SharePoint.Utilities;
using System;
using System.Runtime.InteropServices;
using System.Xml;
 
namespace DisplayTemplatesDemo.Features.Feature1 {
    /// <summary>
    /// This class handles events raised during feature activation, deactivation, installation, uninstallation, and upgrade.
    /// </summary>
    /// <remarks>
    /// The GUID attached to this class may be used during packaging and should not be modified.
    /// </remarks>
 
    [Guid("4d50c166-1095-4d7c-a4c1-61b35687cbf5")]
    public class Feature1EventReceiver : SPFeatureReceiver {
        /// <summary>
        /// Feature activated, we just change the item title of display template to force SharePoint generates the associated .js file
        /// </summary>
        /// <param name="properties"></param>
        public override void FeatureActivated(SPFeatureReceiverProperties properties)
        {
            try {
                var site = (SPSite)properties.Feature.Parent;
                var web = site.RootWeb;
 
                //get all display templates
                string allDisplayTemplates = getAllDisplayTemplates(site.RootWeb, properties.Definition);
                //get the master pages gallery
                var gallery = web.GetCatalog(SPListTemplateType.MasterPageCatalog);
 
                foreach (var displayTemplate in allDisplayTemplates.Split(new char[] {','}))
                {
                    var url = SPUtility.ConcatUrls(gallery.RootFolder.Url, "CNPGallery/Display Templates");
                    url = SPUtility.ConcatUrls(url, displayTemplate);
                    //get the file
                    var fileOrFolder = web.GetFileOrFolderObject(url);
 
                    if (fileOrFolder != null && fileOrFolder is SPFile) {
                        var file = (SPFile)fileOrFolder;
                        if (file.Exists) {
                            //determine if the gallery requires files to be checked out before editing
                            //if so, check this one out
                            if (gallery.ForceCheckout)
                                file.CheckOut();
 
                            //make a simple change
                            file.Item["Title"] = (file.Item.Title != null ? file.Item.Title : displayTemplate);
                            file.Item.Update();
 
                            //if check out required, check it in
                            if (gallery.ForceCheckout)
                                file.CheckIn(string.Empty);
                            //if the gallery has minor versioning enabled, publish a major
                            if (gallery.EnableMinorVersions)
                                file.Publish(string.Empty);
                            //if the gallery required approval, approve it
                            if (gallery.EnableModeration)
                                file.Approve(string.Empty);
                        }
                    }
                }
            }
            catch (Exception ex) {
                //deactivate the feature
                var site = (SPSite)properties.Feature.Parent;
                site.Features.Remove(properties.Feature.DefinitionId);
 
                SPUtility.TransferToErrorPage(ex.Message);
            }
        }
 
        private string getAllDisplayTemplates(SPWeb web, SPFeatureDefinition definition)
        {
            string result = string.Empty;
            try
            {
                string wpcatalogUrl = SPUrlUtility.CombineUrl(web.Url, "_catalogs/masterpage");
 
                // Get the Feature.xml for the feature
                XmlDocument featureXml = new XmlDocument();
                featureXml.LoadXml(definition.GetXmlDefinition(web.Locale).OuterXml);
 
                XmlNamespaceManager nsMgr = new XmlNamespaceManager(featureXml.NameTable);
                nsMgr.AddNamespace("sp", "http://schemas.microsoft.com/sharepoint/");
 
                // Get Location attribute of each ElementManifest inside ElementManifests inside the Feature
                foreach (XmlNode locationNode in featureXml.SelectNodes("/sp:Feature/sp:ElementManifests/sp:ElementFile/@Location", nsMgr))
                {
                    if (result != string.Empty)
                        result += ",";
                    result += locationNode.Value.Replace("Templates\\", string.Empty);
                }
            }
            catch(Exception ex)
            {
                result = string.Empty;
            }
            return result;
        }
    }
}

7. Finally the solution look like below

2frbrtnty8. Build and Deploy the solution

Best SharePoint 2013 Hosting

ASPHostPortal.com  is Perfect, suitable hosting plan for a starter in SharePoint. ASPHostPortal  the leading provider of Windows hosting and affordable SharePoint Hosting. ASPHostPortal proudly working to help grow the backbone of the Internet, the millions of individuals, families, micro-businesses, small business, and fledgling online businesses. ASPHostPortal has ability to support the latest Microsoft and ASP.NET technology, such as: WebMatrix, WebDeploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch, ASPHostPortal guarantees the highest quality product, top security, and unshakeable reliability, carefully chose high-quality servers, networking, and infrastructure equipment to ensure the utmost reliability.

SharePoint 2013 Hosting :: How To Versioning Settings in SharePoint Office 365 and SharePoint 2013

ahp banner sharepoint-01This article will explains how to describes the Versioning Settings in SharePoint Office 365 and SharePoint 2013. Let’s see in this article what versioning offers to us as a user or developer. Versioning is very important for our document libraries. It not only helps in knowing the number of times an item has been modified but also helps when we actually loose data in our files.

Versioning Settings

draft item security

Content Approval

Here we have an option for specifying whether you want to require a content approval for a submitted item. Some libraries contain sensitive information that needs to be protected. We will not always want all the documents uploaded to the library to be visible to all users. For that we have an option where, when you select this option for the library, when a user uploads a document it goes to the moderator that can review and approve the items or files before the content becomes visible to most site users. The moderators can apply a significant level of quality and security to the content in the lists and libraries.

content approve

  • Document Version History
    Here we have an option for assigning versions to whenever our documents are uploaded and modified thereafter.
    We have:

    1. No Versioning: Option if you don’t want versioning.
    2. Create Major Versions: If you select this option, the versions will be created on whole numbers, for example version 1.0, 2.0, 3.0 and so on.
    3. Create Major and minor(draft) versions: If you select this option, the versions will be created as major versions for published documents and minor versions for draft versions as 1.1 and 1.2 and so on.

    Next we have an option to control the number of versions as in the following:

    1. Keep the following number of versions: Here you can assign a number as to until what number of versions the documents should be stored for that specific item.
    2. Keep drafts for the following number of major versions: Here you can assign a number to limit the number of versions of draft items in the library.document version history
  • Draft Item Security
    Drafts versions are items that have not been approved so here you can control the view of those items in your library, in other words who should see them. So, we have options like:

    1. Any user who can read items: users who will have read access also.
    2. Only users who can edit items: users who will have contribute access.
    3. Only users who can approve items (and the author of the item).draft item security in sharepoint
  • Require Check Out
    This option, when selected, will make it mandatory for the users to check out the item before they edit the item.require check out
    I hope this article helpful.

No#1 Best Recommended SharePoint 2013 Hosting

ASPHostPortal.com

ASPHostPortal.com  is Perfect, suitable hosting plan for a starter in SharePoint. ASPHostPortal  the leading provider of Windows hosting and affordable SharePoint Hosting. ASPHostPortal proudly working to help grow the backbone of the Internet, the millions of individuals, families, micro-businesses, small business, and fledgling online businesses. ASPHostPortal has ability to support the latest Microsoft and ASP.NET technology, such as: WebMatrix, WebDeploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch, ASPHostPortal guarantees the highest quality product, top security, and unshakeable reliability, carefully chose high-quality servers, networking, and infrastructure equipment to ensure the utmost reliability.

SharePoint 2013 Hosting with ASPHostPortal.com :: The Quick & Easy Way to Add Metadata to SharePoint Content

What is SharePoint?

Microsoft SharePoint is a dynamic and interactive site that allows users to collaborate and manage content via a browser. SharePoint can be mapped to access documents in a shared folder. You can easily access your documents and files from your desktop or any Microsoft Office application.

Hastags in SharePoint

In this article, we will give you some tips for your SharePoint. These tips use one of the most popular features on social media that’s called hashtags. Hashtags is one of the most popular features on social media. If you use sites like Twitter or Instagram, you’ve certainly seen hashtags, and perhaps even used them in your own posts to group messages and add additional context.

ahp_freehostSHP

Now, hashtags are finding a home in business platforms like SharePoint 2013, providing users with a quick and easy way to add metadata to content. This in turn helps to better categorize content for future searches.

hashtagMKTG_logo_twitter_BLUEThere’s no hiding the fact that metadata and tagging are critical to SharePoint success. People need the ability to easily search for and find information. Yet many users either don’t understand the importance of metadata or simply don’t want to be bothered with tagging. As a result, users often turn to file-sharing services like Dropbox, where they upload their items and move on.

Of course, consumer-grade solutions such as Dropbox don’t provide the security features generally required for business information. That’s why it’s smart to encourage users to take advantage of hashtags in SharePoint. Hashtags are a concept they’re probably familiar with from using social media. That should make using hashtags in SharePoint an easy concept to understand, and ultimately encourage them to use the platform.

How to Use Hastags in SharePoint?

  • Tags must be one word: If you want to create a tag with multiple words, you have to combine the words. Start each word with a capital letter so the tag is easier to read, such as #SharePointTips.
  • Creating hashtags: The article notes that “hashtags are a little quirky in SharePoint.” Users are only allowed to create hashtags in the newsfeed, although they may be used elsewhere.
  • How to “follow” a hashtag: Are you looking to keep tabs on a specific topic? Simply click on the hashtag in a post or add it to the “followed hashtags” section in your profile.

Encourage your users to add metadata by taking advantage of hashtags in SharePoint. The above tips provide a great starting point for helping them to get the most out of hashtags.

Recommended SharePoint Hosting

ASPHostPortal.com has been Microsoft recommended hosting provider. In our SharePoint plan, we offer Support Custom WebParts, SharePoint Site Usage Reports, Support SSL, Users Administration, Intl Language Packs, Public-Facing Access. Get organized with our SharePoint Foundation 2010 Hosting, the leading Microsoft web hosting solution for secure document management, content management, and workflow features for your intranet or extranet requirements. The SharePoint plan is start from $9.99/mo.

SharePoint 2013 Hosting with ASPHostPortal.com :: Increase Your Business with SharePoint

SharePoint gives businesses a shared space to store documents so they’re not locked away on any one person’s hard drive. Documents stored on SharePoint can be accessed by anyone in the company – unless the administrator has limited access to a smaller group. This means that you won’t have to travel to multiple offices or wait for multiple emails to get all the files you need for a task. SharePoint also allows you and your coworkers to work simultaneously on a single document, saving previous versions, and tracking updates. So you avoid having to create several different versions of the document by emailing it to all the people whose input you need.

Tips for Increase Your Business with SharePoint

The real value of SharePoint is in how it helps your business work better. To help you weigh the pros and cons of SharePoint, ASPHostPortal’s SharePoint pros sat down for a short video to boil down some important points and benefits of SharePoint for businesses.

Using SharePoint makes it easier, faster and more integrated.

Maintaining separate systems for document storage, collaboration and project management can waste time and resources. SharePoint brings it all together in one application. That’s one application for the IT team to manage and one application for users access files and business processes.

Creating something that will help our clients work better as an organization.

SharePoint helps teams and individuals securely share files for frictionless collaboration. Using SharePoint as a central document repository means users no longer have to search multiple systems for critical files and are able to discuss, edit and publish new content with a few clicks.

Too many people focus on something specific and they miss out on other opportunities.

SharePoint can serve many purposes for an organization; however, many businesses implement it for a singular, narrow purpose. For example, though most businesses use SharePoint for document management, a high growth area of SharePoint usage is creating public facing websites that can rival the look of any modern day website.

With SharePoint, you get a lot of things included.

Businesses can cut through the challenges of implementation that normally require developer intervention and go live sooner. The standard platform options work hand-in-hand with the ease of implementation to give you the freedom to shape and rapidly deploy the business solutions you need.

You think you need an expert, but you don’t.

You might think that adopting SharePoint means finding an expert to configure, deploy and maintain it. In reality, SharePoint is made to allow those with varying degrees of technical expertise to click around and create the business solution needed to get the job done.

Make it look like anything you want.

The level of customization available in SharePoint gives you the ease of using pre-built templates or the freedom to completely design a custom, customer-facing site. Additionally, SharePoint is an extensible platform that lets you build in additional functionality and further mold SharePoint to your organizational needs

Making SharePoint fit into the needs of your business is key to success. ASPHostPortal maintains an expert staff, six of which have been honored with the Microsoft Most Valuable Professional (MVP) award for their community leadership & expertise in SharePoint, and one staff member has achieved the level of Microsoft Certified Master (MCM) for SharePoint. These employees focus on providing service for our SharePoint customers. Our experienced team can show you how SharePoint can help you achieve your stated goals and tackle goals you might not have thought of SharePoint for.