Skip to main content

Posts

Showing posts with the label SharePoint

SharePoint Online/O365 List field views column formatting for hyperlink

  { "$schema" : "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json" , "elmType" : "a" , "txtContent" : "View" , "attributes" : { "href" : "@currentField" , "target" : "_blank" } } dynamically bind the item ID to the URL: { "$schema" : "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json" , "elmType" : "a" , "txtContent" : "View" , "attributes" : { "target" : "_blank" , "href" : "='https://apps.powerapps.com/play/3fdd0765-2de4-44aa-a81c-7c424ff54ca5?Mode=Edit&ID=' + [$ID]" } }

Custom People picker SharePoint

<script   type = "text/javascript"   src = "/_layouts/15/1033/strings.js" ></script> <script   type = "text/javascript"   src = "/_layouts/15/SP.RequestExecutor.js" ></script> <script   type = "text/javascript"   src = "/_layouts/15/clienttemplates.js" ></script> <script   type = "text/javascript"   src = "/_layouts/15/clientforms.js" ></script> <script   type = "text/javascript"   src = "/_layouts/15/clientpeoplepicker.js" ></script> <script   type = "text/javascript"   src = "/_layouts/15/autofill.js" ></script> <script   type = "text/javascript"   src = "/_layouts/15/sp.js" ></script> <script   type = "text/javascript"   src = "/_layouts/15/sp.runtime.js" ></script> <div class="form-group"> ...

CSOM in SharePoint

We have to refer the Client side DLL firstly using sp = Microsoft.SharePoint.Client; Creating sample JSON PriceValuesJSON = @"[                                                             {                                                             ""Title"": ""SN"",                                                             ""value"": 41.4                                                         ...

SharePoint REST API

You can perform CRUD operations like Create, Read, Update and Delete. REST means Representational State Transfer SP introduces client side object model and then similar or corresponding other solution is REST API. Users can intact with application remotely with SharePoint data that support REST web requests. It supports OData syntax which means standard open data protocal Firstly we need to create Restfull HTTP  request by using OData standard which is corrosponding to the CSOM API. After interacting with SharePoint database with HTTP request, it retries or gives the data back in JSON format which is also called as Javascript Object Notation. GET, POST, PUT or MERGE, DELETE are the HTTP requests used in REST API _spPageContextInfo . webAbsoluteUrl  +  "/_api/Web/Lists/GetByTitle('ListName')/Items While create a list item, var data = { __metadata: { ' type' : ' SP.Data.SpTutorialListItem' }, Title: ' Some title' , S...

Auto Chase site workflow using SharePoint designer

Scenario: When ever a list item has not approved after one day, that means when ever modified date exceeds 1 day and compare with today date eg: Modified date+1 = 28-Aug + 1 day = 29 Aug is the modifiedPlusone date and todaydate is 29 Aug Now if modifiedPlusone >= todaydate then send email to the user. In the above scenario, you can create a site workflow and you can use certain actions and run the workflow daily. Workflow: Stage:Stage 1 Build {...} Dictionary (Output to Variable: JSonRequestHeader ) Call https://team.uat.sp.wp.corpintra.net/... HTTP web service with request (ResponseContent to Variable: JSonResult |ResponseHeaders to responseHeaders |ResponseStatusCode to Variable: responseCode ) Get d/results from Variable: JSonResult (Output to Variable: list ) Count Items in Variable: list (Output to Variable: counting ) Set Variable: index to 0 Loop: Loop the List The contents of this loop will run Variable: counting times Get d/results([%Variabl...

SharePoint List forms how to customize using JQuery

Here is the solution to customize SharePoint list forms with out using SharePoint designer. This solution is using "Jquery" You can add bootstrap references for custom design Step 1: Create a SharePoint custom list Step 2: Create columns as 1. Person 2. Title (which is out of the box) Step 3: Click on the "new form", or "edit form", or "view form" of out of the box SharePoint List. Step 4: Edit the form Step 5: Add new content editor and refer a .html/.txt custom file where you refer the below code Click on Save Follow the code below: HTML: <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> //Jquery reference <script src="../../SiteAssets/JS/jquery-1.7.1.min.js"></script> <body> <div class="fulldiv"> <label for="" class="ms-font-m-plus" id="taskDesc_task">Title:...