Tuesday, 3 April 2018

SPServices : How to prepare date data for the SharePoint list date field using JavaScript?


var currDate = new Date();

var numDay=currDate.getDate();
var numMonth = currDate.getMonth();
var numYear = currDate.getFullYear();

var tempDate = (++numMonth)+"/"+(numDay)+"/"+numYear ;
var spDate = new Date(tempDate).toISOString();

//e.g. 2019-08-29T18:30:00.000Z


Note: You may have to adjust numDay based on the timezone.

How to fetch the email of the current user using SPServices?



$( document ).ready(function(){

 currUser = $().SPServices.SPGetCurrentUser({

  fieldNames: ["WorkEmail"],

  debug: false

 });

currUserEmail = currUser.split('p|')[1];

})

How to find the day number from today's date in SharePoint designer 2013?




How to split a string in SharePoint 2013 designer workflow to extract a substring?



How to activate SharePoint 2013 workflows on a SharePoint Online site?


Go to site settings > Workflow settings > Workflow Health > Activate

Monday, 2 April 2018

How to update text and tooltip of default save button in w2ui grid?


var btn = w2obj.grid.prototype.buttons;
btn['save'].text = w2utils.lang('New Text');

btn['delete'].text = w2utils.lang('Reject Selected');
btn['delete'].tooltip = null;

Sunday, 1 April 2018

CAML Query : How to put four AND conditions?


<And>
    <Eq>condition</Eq>
    <And>
        <Eq>condition</Eq>
        <And>
            <Eq>condition</Eq>
            <And>
                <Eq>condition</Eq>
                <Eq>condition</Eq>
            </And>
        </And>
    </And>
</And>