Wednesday, January 24, 2018

ShareGate Issue Not Listing All Site Collections under a Web Application

Problem:
Sharegate is not listing down all the site collection under a web application, when connected to a web application.  Though the connection is made successfully.

Solution/Resolution:
It requires a separate connection for each site collection. So need to connect to a site collection before you use it for any reporting/migration.

Observation:
It could be a bug in Sharegate tool.

Thursday, January 18, 2018

SharePoint REST Get All Columns of a List

The below sample lists all the internal names columns of a list.
<script type="text/javascript">
$(document).ready(function () {
    console.log("ready!!");

$.ajax({
        url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/GetByTitle('ListName')/items?$select=*",
        type: "GET",
        headers: {
            "accept": "application/json;odata=verbose",
        },
        success: function (data) {
            console.log(data.d.results);
        },
        error: function (error) {
            console.log(JSON.stringify(error));
            alert("Error occured in loading columns!");
        }
    });

});
</script>