Skip to main content

Posts

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...

Power Apps

Community plan: PowerApps Community Plan gives you access to PowerApps premium functionalities, Common Data Service, and Microsoft Flow for individual use. This plan is primarily meant for learning purposes or creating business solutions to be distributed for AppSource Test Drive. This plan is perpetually available, but only for learning and building your skills on PowerApps, Common Data Services, and Microsoft Flow. It can run unlimited number of apps We can use common data service Connect to Office 365, Dynamics 365 User premium connectors like Salesforce, DB2 Access on premises date using on premises gate way Cloud environments like Azure, SQL, Dropbox, Twitter Can create custom connectors Common data service, Can create run common data service, model your common data service, create database in common data service User roles and access permissions: You can't add co-workers as environment makes and admins Add co-workers to the database role...

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:...

Javascript

Once after page loads, your DOM is ready to load the functions $(document).ready(function(){   myFunction(); }); function myFunction(){   alert("Hello World"); } var carsArray = ["Ford", "Maruthi", "Benz", "Audi"]; carsArray.sort(); //to sort the array //To find its value, then seach by its index carsArray[0] means you will get its value as Audi what is JSON array JSON array is array with key and value pair or Object inside an Array. JSON array most popular data format or data model used in current market. var carJsonArra = [{"Teja":29},{"Meena":24},{"Mouni":28}]; carJsonArra[0]// means it gives 0th index value as {"Teja":29} which is a object inside an array carJsonArra.length // gives length of the array means count of objects inside array //Loop the array in javascript var myData = [{Name: 'Teja'},{Name: 'Mouni'},{Name: 'Meena'}] for(var i=0;i...

Power BI

Power BI ref guide:  https://docs.microsoft.com/en-us/power-bi/desktop-what-is-desktop Introduction Power BI Desktop is a free application you can install on your local computer that lets you connect to, transform, and visualize your data. With Power BI Desktop, you can connect to multiple different sources of data, and combine them (often called modeling) into a data model that lets you build visuals, and collections of visuals you can share as reports, with other people inside your organization. Most users who work on Business Intelligence projects use Power BI Desktop to create  reports, and then use the Power BI service to share their reports with others. The most common uses for Power BI Desktop are the following: Connect to data Transform and clean that data, to create a data model Create visuals, such as charts or graphs, that provide visual representations of the data Create reports that are collections of visuals, on one or more report pages Share ...

Power BI, IF condition

Create a calculated column that uses an IF function Stores table has a column named Status, with values of "On" for active stores and "Off" for inactive stores, which we can use to create values for our new Active StoreName column. Your DAX formula will use the logical IF function to test each store's Status and return a particular value depending on the result. If a store's Status is "On", the formula will return the store's name. If it’s "Off", the formula will assign an Active StoreName of "Inactive". 1. Create a new calculated column in the Stores table and name it Active StoreName in the formula bar. DAX Expression: Active StoreName = IF([Status]="On",[StoreName],"Inactive") Store Table fields: Final Output:

In Power BI, What is RELATED function

DAX formulas can leverage the full power of the model you already have, including relationships between different tables that already exist. We can apply DAX expressions the new column For example, I have "ProductCategory" table and "ProductSubCategory" table Data table fields: Data OutPut: DAX Formula: ProductFullCategory = RELATED(ProductCategory[ProductCategory])& " - " &[ProductSubcategory] from above expression, RELATED is the dax function which will join two columns. ProductFullCategory is the column created in ProductSubCategory table with DAX function. Inside Related function, we have to specify which table we need the columns and its column name.

SharePoint Framework SPFX deploy in SharePoint

Hi Guys, If you are interested with latest framework of SharePoint (SPFX). I have created a project and deployed successfully in O365 site. I have provided few code samples with steps and procedure to get started.  Go through the below links and the articles. Happy Coding.... Getting Started : Create an SPFX webpart and run it in local host https://tejasadventure.blogspot.com/2019/09/chapter-1-sharepoint-framework-getting.html Create an App Catalog site to deploy our webpart https://tejasadventure.blogspot.com/2019/09/create-app-catalog-in-sharepoint-o365.html Steps to know how to deploy the webpart in SharePoint O365 site https://tejasadventure.blogspot.com/2019/09/how-to-deploy-spfx-webpart-in-to.html Sample project from Git Hub: This project demo of user interface flipcards.  https://mercedessaga.sharepoint.com/sites/teja_dev/SitePages/flipcard.aspx Operations performed: RestAPI has used for CRUD operations Framework used:...

Create an App Catalog in SharePoint O365 and upload the sharepoint framework solution to App Catalog

In Order to create an App Catalog in SharePoint, Firstly create an O365 tenant and create SharePoint site collection. 1. Create an O365 tenant Ref:  https://developer.microsoft.com/en-us/office/dev-program Ref:  https://developer.microsoft.com/en-us/office/dev-program 2. Create a new site collection. Ref:  https://docs.microsoft.com/en-us/sharepoint/dev/spfx/set-up-your-developer-tenant#create-a-new-developer-site-collection 3.  Create an App catalog site, where we can store our custom SpFx webparts and these webparts will be available across all the site collections. Ref: https://docs.microsoft.com/en-us/sharepoint/dev/spfx/set-up-your-developer-tenant#create-app-catalog-site 4. Open "Central Admistration", Click on "Apps" in the left navigation panel. https://<yoursitename>-admin.sharepoint.com/_layouts/15/online/SiteCollections.aspx or https://<yoursitename>-admin.sharepoint.com/_layouts/15/online/tenantadminapps.aspx 5. After...

How to deploy SPFX webpart in to SharePoint O365 site

Let us assume we have spfx webpart running in our local host. How to deploy SPFX webpart in to SharePoint? 1. Stop the gulp serve which will stop running the local host 2.  Unlike in the Workbench, to use client-side web parts on modern SharePoint server-side pages, you need to deploy and register the web part with SharePoint. First you need to package the web part. Open the  MyCustomWebPart  web part solution in Visual Studio Code, or your preferred IDE. 3 .  In the console window, enter the following command to package your client-side solution that contains the web part. Run " gulp package-solution " The command creates the package in the  sharepoint/solution  folder:  webpartname.sppkg The package uses SharePoint Feature to package your web part. By default, the gulp task creates a feature for your web part. You can view the raw package contents in the  sharepoint/debug  folder. The contents are then packaged ...

SPFX how to link the external libraries:

After create an sample spfx webpart with "nojavascript" 1. In visual studio code, open config.json file in your machine (press ctrl+p and type config.json file). 2. external object key shows empty initially. 3. Open Node JS cmd prompt and install requried external library files using npm To Install Jquery : npm install jquery@2 Install Jquery types for typescript handy: npm install @types/jquery@2 Jquery UI npm install jqueryui npm install @types/jqueryui Bootstrap npm install bootstrap Angular: npm install @types/angular --save-dev Under externals key object provide below reference "externals" : {      "jquery" : "node_modules/jquery/dist/jquery.min.js" ,      "angular" : {        "path" :  "https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.6/angular.min.js" ,        "globalName" :  "angular"   ...

SharePoint Framework Getting Started

Learning path for SharePoint Framework Hello Guys, I have listed few blog links below for reference purpose to make it easier to understand or refer the code regarding SharePoint framework. First Learn about scaffold of SharePoint framework: https://tejasadventure.blogspot.com/2020/05/sharepoint-framework-basic-understanding.html SPFX modern pages https://tejasadventure.blogspot.com/2020/06/spfx-modernizing-sharepoint.html 1. Create an O365 tenant Ref:  https://developer.microsoft.com/en-us/office/dev-program 2. Create a new site collection. Ref:  https://docs.microsoft.com/en-us/sharepoint/dev/spfx/set-up-your-developer-tenant#create-a-new-developer-site-collection 3. Create an App catalog site, where we can store our custom SpFx webparts and these webparts will be available across all the site collections. https://tejasadventure.blogspot.com/2019/09/sharepoint-framework-spfx-deploy-in.html 4. Know how to deploy the solution in to SharePoint catalog. https://tejasad...

CSS media queries with min and max

/*Desktop*/  @media only screen and (max-width: 1366px) and (min-width: 1281px)  {}   /*Ipad*/   @media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: landscape) {   }   @media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: portrait) {   }   /*Mobile*/   @media only screen and (min-device-width: 1px) and (max-device-width: 767px) and (orientation: landscape) {   }   @media only screen and (min-device-width: 1px) and (max-device-width: 767px) and (orientation: portrait) {   }