Insert data view button is disabled in SharePoint Designer

I work every day with SharePoint Designer, which I consider to be a great tool. But sometimes I discovered insert data view button is disabled.
If you ask why this is happening, because everything seems to be correct on the content page, I can tell you this is not a SharePoint Designer bug. It is related to ContentPlaceHolderID property. In SharePoint environment, this property is not case sensitive, so the code below is working, even if id of content placeholder is PlaceHolderMain, not PlaceholderMain.

<asp:Content runat="server" ContentPlaceHolderID="PlaceholderMain">

But even if your page is functional, not respecting case sensitivity of ContentPlaceHolderID property can create problems for SharePoint Designer. So, please be sure you respect this and adapt the code accordingly.

<asp:Content runat="server" ContentPlaceHolderID="PlaceHolderMain">

“Folder name is not valid” error trying to open a SharePoint Online site with SharePoint Designer

I was experiencing an error trying to open a SharePoint Online website with SharePoint Designer. I was receiving “Folder name is not valid” error and opened a request to SharePoint Online Support Team. I need to tell you the support was very good in this case. They figure out fast was an access denied issue causing the error.

It turned out the solution was an easy one, even I am not sure how happy customers can be with it. When you log to SharePoint Online using your credentials you need to check “Keep me signed in” option.

2015-03-20 11_37_34-Sign in to Office 365

After login step, you need to browse at least once website you are trying to open. This being told, you can try to apply this for future cases, until Microsoft will publish the solution on their site.

Opening SharePoint 2013 site with SPD 2010

Microsoft is still making fun us. Is the only conclusion I could have it today. Thanks to this post, I discovered I can still use SPD 2010 for new generation of SharePoint. Why I need it? The answer is simple, I my team I will have a new colleague without experience on coding XSLT. SharePoint Designer 2010 is a good option for this. And I just uninstall all updates and it worked. Hello Microsoft! Do you want leave some people without a job. Consider first some people are earning some money doing SharePoint customization.

Custom form slow performance

Recently, I have discovered some performance issues with custom forms created with SharePoint Designer. Mysteriously, form was slow even for adding new records to the list.
Looking into the code created by SharePoint Designer, I discovered that new form was based on SPDataSource with ListItem mode set and CAML was getting all data from the list.

<SharePoint:SPDataSource runat="server" DataSourceMode="ListItem" SelectCommand="&lt;View&gt;&lt;Query&gt;&lt;Where&gt;&lt;Eq&gt;&lt;FieldRef Name=&quot;ContentType&quot;/&gt;&lt;Value Type=&quot;Text&quot;&gt;Item&lt;/Value&gt;&lt;/Eq&gt;&lt;/Where&gt;&lt;/Query&gt;&lt;/View&gt;" UseInternalName="True" ID="Service_x0020_List_x0020_Marcom1">
         <WebPartPages:DataFormParameter ParameterKey="ListItemId" PropertyName="ParameterValues" DefaultValue="" Name="ListItemId" />
        <WebPartPages:DataFormParameter ParameterKey="ListID" PropertyName="ParameterValues" DefaultValue="{036D8075-3258-4DA2-8804-52897332DD3E}" Name="ListID" />

Analyzing CAML select command, I realized SPDataSource is getting all rows from Item content type. For a custom list this probably means all rows. So, I decided to change it.

<SharePoint:SPDataSource runat="server" DataSourceMode="List" SelectCommand="&lt;View&gt;&lt;Query&gt;&lt;Where&gt;&lt;Eq&gt;&lt;FieldRef Name=&quot;ID&quot;/&gt;&lt;Value Type=&quot;Counter&quot;&gt;{ItemId}&lt;/Value&gt;&lt;/Eq&gt;&lt;/Where&gt;&lt;/Query&gt;&lt;/View&gt;" UseInternalName="True" ID="Service_x0020_List_x0020_Marcom1">
         <WebPartPages:DataFormParameter ParameterKey="ItemId" PropertyName="ParameterValues" DefaultValue="" Name="ItemId" />
        <WebPartPages:DataFormParameter ParameterKey="ListID" PropertyName="ParameterValues" DefaultValue="{036D8075-3258-4DA2-8804-52897332DD3E}" Name="ListID" />

What I changed:

  • SPDataSource was set to List mode from ListItem.
  • CAML was changed and filter was applied on ID field.
  • ListItemId parameter was changed to another one. I called it ItemId, but you can choose different names. Is also a good idea not to bind this parameter to ID query string.

Applying this changes results in speed increase. Try it and you will see. Don’t let SharePoint Designer control you.