Friday, September 28, 2018

Using JSLink as an alternative for Calculated columns to Display Images Depending on Checkbox values

alert("Hello");

(function () {
    alert('starting')
    var fieldCtx = {};

    fieldCtx.Templates = {};
    fieldCtx.Templates.Fields = {
        "ShowOnDisplayBoard": //This is field name, make sure to enter the internal column name
        {
            "View": UpdateApprovalTempalte //Enter the function name
        }
    };

    SPClientTemplates.TemplateManager.RegisterTemplateOverrides(fieldCtx);
})();

var imgTrue = "<img src='/siteassets/checked.png' width='16px'/>"
var imgFalse = "<img src='/siteassets/uncheck.png' width='16px'/>"
 

function UpdateApprovalTempalte(ctx) {
    var columnValue = ctx.CurrentItem.ShowOnDisplayBoard;  // get the value of the ApprovalColumn field of the current item
    var returnValue = "";
    if (columnValue == 'Yes')
        returnValue = imgTrue;
    else if (columnValue == 'No')
        returnValue = imgFalse;
    else if (columnValue == '')
        returnValue = imgFalse;
    else
        returnValue = columnValue;

    return returnValue;
}

Thursday, August 2, 2018

Backup and restore SharePoint online site

To back up and restore data in SharePoint Online, we can create an Office 365 support ticket to achieve it.
More information:
Thanks
Best Regards


I hope the above suggestion clarifies your concern, In SharePoint Online, we cannot backup and restore contents as what we do in SharePoint Server 2013. Instead, the backup and restoring features are reflected by the following features: version, template, recycle bin and some third party solutions.

Please follow this links to get more information about backup process in SharePoint Online

https://itsolutionsblog.net/the-backup-options-in-sharepoint-online/

How to back-up a Office 365 SharePoint Online site and data

Restore options in SharePoint Online
Hope this helps!


Migration solution to migrate to-and-from SharePoint and Office 365 along with File Servers, Exchange/Office 365 Public Folders, Google Drive and OneDrive Business to SharePoint Online/On-premise migration.

Friday, July 27, 2018

WebApi - Enable to CORS - cross domain - get Json format

WebApiConfig.cs under App_Start

using System.Net.Http.Headers;
using System.Web.Http;
using System.Web.Http.Cors; 


// Web API configuration and services
            var cors = new EnableCorsAttribute("*", "*", "*");
            config.EnableCors(cors);


config.MapHttpAttributeRoutes();

            config.Routes.MapHttpRoute(
                name: "DefaultApi",
                routeTemplate: "api/{controller}/{id}",
                defaults: new { id = RouteParameter.Optional }
            );

//This will get JSOn format
            config.Formatters.JsonFormatter.SupportedMediaTypes.Add(new MediaTypeHeaderValue("text/html"));

List View Filter - Show only Today's Or Less than 7days items


If you want to filter only items that are less than 7 days old then you just use
Filter
  • Created
  • is greater than or equal to
  • [Today]-7
Note - the screenshot is incorrect.
New items - created in last 7 days


Update or edit status filed in JIRA issue

the status field is a special case and can't be updated directly, which is the second problem here. Changing a status in Jira is called ...