Tuesday 31 May 2016

Microsoft SharePoint is not supported in 32-bit process. Please verify that you are running in a 64-bit executable.

Error: Platform not supported exception

Description:

I was writing a console application using Visual Studio 2012 to use SPSite object of SharePoint 2013.When I ran the application I was getting the following error.

Microsoft SharePoint is not supported in 32-bit process. Please verify that you are running in a 64-bit executable.

Solution:

In the solution explorer right click on the project and then click on Properties. Click on Build tab. Check whether Platform Target is selected as Any CPU. Make sure Prefer-32 bit is not selected.

Monday 2 May 2016

How to login as different user in SharePoint 2013?

Hi All,

You might face an issue while trying to do sign in as different user in SharePoint 2013.

Here is the url to do :

http//<sharepoint site_url>/_layouts/closeConnection.aspx?loginasanotheruser=true

Hope this helps!!!




Sunday 1 May 2016

Creating an list Item inside the folder using JSOM


Hello All,

Below code will help you to create an item inside the Folder.

Here is the code:

var clientContext = SP.ClientContext.get_current();
var list = clientContext.get_web().get_lists().getByTitle('Master');

var itemCreateInfo = new SP.ListItemCreationInformation();
itemCreateInfo.set_folderUrl('/Lists/Master/FolderName');

var listItem = list.addItem(itemCreateInfo);
listItem.set_item('Title', 'Hello!');
listItem.update();

clientContext.load(listItem);
clientContext.executeQueryAsync(function (sender, arges) {
    alert('Added');
}, function (sender, arges) {
    alert(arges.get_message());
});

Hope this helps!!!