Monday, January 27, 2014

how to remove/change "There are no items to show in this view of the list. To add a new item, click New" in SharePoint 2013.


Change/Remove the message when no items in List/library - "There are no items to show in this view of the list. To add a new item, click New".
Add the below code in content editor...


<script>
function ChangeDiscussionMessage()
{

  var a = document.getElementsByTagName("TD")
  for (var i=0;i<a.length;i++)
  {
    if (a[i].className=="ms-vb")
    {
      if (a[i].innerText.indexOf("There are no items to show in this view")>-1)
      {
         a[i].innerHTML = "No items in this list.";
      }
    }
  }
}

_spBodyOnLoadFunctionNames.push("ChangeDiscussionMessage")

</script>


IF you want to do this for every list add this code to master page.

Saturday, January 25, 2014

Problems with SharePoint anonymous access

Out of the box, anonymous access is a pretty cool idea but breaks several things.  Just to help those who may think about anonymous access (defined as users that don't log in at all on something), here is a list of things that are altered:

1. Workflows - workflows that are set to automatically run when you create a new item will break if you turn on anonymous access.  Not only will the workflow not run, but here's what will typically happen:  a user will click "new", fill out your SharePoint form, and then they click OK.  When they do, they get an error message saying that there is a Server Out of Memory and think that something went wrong, so they try to fill it out again.  What the anonymous user DOESN'T know is that their information WAS submitted but the workflow didn't run.  The error message that they saw was in regard to the workflow.  If this happens, the primary way people are fixing it is to create a new list as a copy of the current list, copy all the data over from the old list to the new one, and delete the old list.  You CANNOT just delete the workflow...certain pieces of the workflow are not deleted when you delete a workflow and those are the things that are breaking the workflow.  Some people have figured out another solution but this seems to be the main way to fix it.

2. Surveys - SharePoint surveys are already a very limited template but they get further limited with anonymous access in that you cannot use branching logic, page breaks, or limiting people to only filling out a survey 1 time.  This doesn't mean it's not useful, it's just very limited in its applications.

3. Libraries - Anonymous users are not meant to access libraries, so just get that out of your head now.  Technically, you can use a URL hack to allow them access but they won't be able to add and upload documents or anything.

4. InfoPath Forms - anonymous users can't access infopath forms unless you have forms-based authentication (which supplies a default username/password if none exists when you turn on anonymous access).

5. Edit or Read Your Own - these settings typically only allow someone to see or edit their own stuff...well, this is impossible with anonymous users because there's no way to tell one anonymous user from another and, thus, it will not show anything for anonymous users.  This can sometimes be a benefit and other times a problem.

Tuesday, January 21, 2014

How to reset SharePoint List forms from InfoPath to the default forms.

Recently, I've converted a Custom List forms to use InfoPath forms using SharePoint Designer, now I want to revert this back and return to the normal New, Edit and Details forms.

Here is what I did

1. In SharePoint Designer I Clicked on Lists and Libraries
2.Click on the List I modified
3. In the Ribbon I select Design Forms in InfoPath in Actions Group
4. I started to design the form like I want
5. I published the modifications to the List

here the solution:

we can do this in SharePoint without needing SP Designer.

1.Navigate to the list in SharePoint.
2. On the List ribbon bar, click List Settings.
3.Under General Settings, click Form Settings link (bottom of first column).
4. Select the Use the default SharePoint Form option.

We can also opt to delete the custom form by checking Delete the InfoPath Form from the server.

Tuesday, January 14, 2014

Error Type:The form cannot be submitted to the specified SharePoint list or document library. The SharePoint location may be read-only or you may not have permissions to access it.

I recently ran into an issue "The form cannot be submitted to the specified SharePoint list or document library. The SharePoint location may be read-only or you may not have permissions to access it."


Problem source is:

There is one custom list and items are added through workflow and when anonymous user try to edit and while saving getting the error.

The root cause of that error is


Possible fixes is :

Modify the Item-Level Permission to allow all users to "Create and edit all items"-
Go to List Settings –> Advanced Settings
Change the "Item-Level Permissions" back to allow all users to "Create and edit all items" – this assumes you don't need item-level permissions on this list.