Monday 30 December 2013

DataSheet View And People Picker issue

Hi All,
 Today i will share a weird issue i had gone through. Surely U will have to face it in some point of time.

Certainly everyone would have used Datasheet View. Have U ever checked People picker column in DataSheet View?

Bcoz when i tried, i got "Column Mismatch" error. When i tried the same entry in a Standard view, it got saved... So what is the prob and how to fix???

Finally, I fixed that after checking it for a Whole Day.
The Fix is ,
 U have to give atleast Read rights for the User to be entered in the People Picker.

People picker can validate user by name,email, id etc. in Standard View. But when you open it in Datasheet view then it does not validate the person by name,email. And instead of validating you will see small picker at person or group something like a choice column. You have to select from that.


Small one. But this will be certainly useful for you sometime..
Happy SharePointing...

Tuesday 24 December 2013

Programmatically Hiding the "Overwrite existing files" checkbox for a single library

Hi All,
Last week i got a challenge for hiding the "Overwrite existing files" checkbox for a particular library.
First i thought it would be very easy , because my option was like adding a simple javascript to hide for that library.
I opened SharePoint Designer and tried adding javascript to that. It was not reflecting.. :(:(

On digging deep, I came to know that Upload.aspx is an application page and it is coming from the Layouts folder.
Ok finally i thought i found out the solution and tried changing the Upload.aspx page in the layouts folder. But the checkbox got hidden on all the pages..

Again i have to give a check on that so that it gets reflected for only one library. Finally i pointed out the List GUID in the URL of the page.

Then i tried and found 2 solutions for hiding checkbox for a single library.

Solution 1) Use this script in your master page

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready( function () {
        if (location.href.indexOf('0ABCE757-34A6-409D-A230-72382C924651') >= 0)
 // you must need to change GUID of your lib above
       {
            $("label:contains('Add as a new version to existing files')").prev('input').hide();
            $("label:contains('Add as a new version to existing files')").hide();
            $("a:contains('Upload Multiple Files...')").hide();
        }
    });
</script>

For easily finding the GUID of a library u can refer my post here


The second solution I will share on my next post. C ya!!!!