Skip to main content

Posts

Showing posts with the label SharePoint

SharePoint URLs to navigate quickly

At some point you want to navigate to other page on SharePoint like Site setting page or Site content page but you forgot the navigation path or you want to navigate quickly at that time these URLs will be very useful. You can navigate to particular page using these URLs without navigating through site. Change the tenant name and appropriate site URL and paste the it into address bar. These are some useful url's for SharePoint. You can navigate in SharePoint without using site navigation but   for this you must have required permission otherwise you will get “Access denied”. Some useful URL's for Microsoft Office 365/SharePoint  Users. Useful url's to navigate under the Microsoft 365 admin center (For this Admin Access is required): 1.  URL to check all the active users on sharepoint site. You can have option to add users, to delete users, to imply multi factor authentication etc. https://admin.microsoft.com/Adminportal/Home?source=applauncher#/users 2...

Add and edit user profile properties in SharePoint

You can manage the user profiles from the Office 365 admin center. if you want to create new user profile properties you can do it from user profile properties. you can update the user profile properties by accessing user profiles from the SharePoint admin center. (Admin level permission required to perform this) 1. Open  Microsoft 365 admin center and navigate to SharePoint admin center.  2. On SharePoint admin center , Click on More features 3. Now click on the open , under the User profiles section. 4. Now you are at manage profile page, Click on Manage User Properties 5. Click on New Property and it will redirect you to another page. Add caption 6.   In the Property Settings  section, In the Name box, type the name of property, this name is used        by services, In the Display Name box, type the name, this name will be displayed at user profiles to all users. In the User Description sectio...

How to register an app in SharePoint

In this article, we are going to learn how to register an app/add-in in SharePoint online. If you have created a Sharepoint provider-hosted add-in or other SharePoint solution and to access the SharePoint site or list using the app/add-in you need to register the add-in on SharePoint and to grant permission. Register app in SharePoint 1. Login into SharePoint and Navigate to register an app page. Use the URL mentioned below:          [Sitecollection URL]/_layouts/15/appregnew.aspx 2.  Once you navigate to the Register app page, a form will open. You need to fill all the fields on the form. Client Id and Client Secret  generated when we click on the generate button available next to the fields.  Title : Name of the add-in which you want to give. App Domain : Where your domain is hosted, for the local environment you can place             "www.localhost.com". Do not include HTTP or HTTPS...

How to check permissions of user on sharepoint list using csom.

In this article, we are going to learn "How to check the permissions of user on SharePoint list using csom " or permissions of user using code. In provider-hosted SharePoint Add-ins, we use the csom code and to check the permission of the user on a particular list, once we get the effective permission of particular user on the SharePoint list and then by using that permission we can check the particular kind of permission like Addlistitem, Editelistitem, etc. In this example, we have created a console application to check whether the user has edit permission on the list or not.  Pass the client context, email of the user and list name on which you want to check the permission of the user. using System; using System.Security; using Microsoft.SharePoint.Client; namespace PracticeCsom {     class Program     {         static void Main(string[] args)         {            s...

How to get the Sharepoint Field Internal name by display name using CSOM

In this article we are going to learn  “how to get the sharepoint internal field name using the display name” of field. To perform any operation on the field. First we need to get field collections, every SharePoint list have fields and we can get it as FieldCollection . By iterating the field collection we can get information about all the fields. Call the method and pass the context , name of the list from which you want to get data and display name.  GetInternalFieldName( ClientContext clientContext ,string listName, string fieldDisplayName){        string fieldInternalName= " ";        var web = clientContext.Web;       clientContext.Load(web);       List listEventSource = web.Lists.GetByTitle(listName);       FieldCollection fields = listEventSource.Fields;       IEnumerable<Field> fieldsColl = clientContext.LoadQuery(fields); ...

How to create list from template in sharepoint

In this article, we are going to learn how to create a list from list template or using(.stp) file or we can say create list from existing list. Once you save the list as a template, It appears into List template option under the web designer gallery on site setting page. Steps to create list from list template: 1 Move to the site setting section where you have saved the list template. 2. When you click on the List templates, you will redirect to the List template gallery and from the list template gallery. 3. Now click on the File in ribbon and click on the upload document. 4. Browse the location where your list template is downloaded. I am uploading the template of an address list. 5.  After browsing the template, now you can give the name what you want to give to the list template and click on save. 6. Now the list template file appears into the list template gallery. Now click on the gear  icon and click on the Add an app. 7. On clicking add...

How to change the navigation in communication site sharepoint

In this article, we are going to learn, how to change the navigation in Modern SharePoint. In modern communication sites, two navigation options are available Megamenu and Cascading by default the megamenu is selected. You can also get answers related to your queries like "How to change header and footer". Follow the steps to change Navigation: 1. Navigate to your SharePoint site and click on the setting icon . 2. Under Change the look option, click on the Navigation. 3. On the navigation options by default, the megamenu option is selected. Now you can save it or cancel it. 4. If the selected option is megamenu, your site navigation will look like this. 5. If you select the cascading option and save it. 6. If you selected the cascading option. site navigation will look like this. Other things into the change the look option. In the change the look setting, we have multiple options like Theme , Header , Navigation , Footer . In Footer opti...

System Update in SharePoint.

When we write code to update the SharePoint list item, we use the Client-side object model or Javascript object model. When we write the code we get two options for updating the list item  update()  and  systemupdate(). update vs system update SharePoint? update() method : When we use the update() method it updates the "Modified"  and "Modified By" column and if the Versioning option is enabled then it also updates the version column. systemupdate() : When we use systemupdate() method. this method did not update the   "Modified"  and  "Modified By"  column and Version. So when you do not want to update these columns while updating use the systemupdate() method. Let's view the code written in Jsom to update the item using the systemupdate (). function updateItem() { var clientContext = new SP.ClientContext('enter your site url'); var oList = clientContext.get_web().get_lists().getByTitle('enter title of your list...

How to save list as template in SharePoint

In this blog, we are going to learn, how to save the list as a template. We can save the list as template with the content and without content but there is a restriction of size for the content. List template are provide us flexibility to recreate list with same structure. Using this list template we can create a list with the same structure(same column name and same type) anywhere we wanted to. In Modern SharePoint, we need to enable custom scripting to view this option. Please follow these steps to save the list as a template. 1. Navigate to your target list which you want to save as a template. 2. Click on the List setting . 3. Now click on the Save list as template. 4. Now give a file name and template name, you can also check the include content option if you want to save the template with content but there is a limit for the content size and if you want to save the template without content do not check the include content option and click on OK . ...

How to check whether list item contains attachment or not using code.

To check whether the list item contains the attachment programmatically or using CSOM. Get the list item collection and then check for the attachment column. List listEvent  = web.Lists.GetByTitle(listName); clientContext.Load(listEvent, L => L.Id); CamlQuery camlQuery2 = new CamlQuery(); camlQuery2.ViewXml = "<View><Query></View></Query>"; ListItemCollection item_Coll = listEventSource.GetItems(camlQuery2); clientContext.Load(item_Coll); clientContext.ExecuteQuery(); foreach (ListItem oLstItem in item_Coll)   {   bool attachmentPresent = Convert.ToBoolean(oLstItem["Attachments"]);   if (attachmentPresent)     {             Console.WriteLine("Item is present");     }    } Happy Coding !!!!!

Content editor web part missing in SharePoint/Modern SharePoint.

Media and content editor web part missing in SharePoint online. At Some Point, you need to add content editor web part into the modern site but the content editor web part did not appear on the page, to appear content editor web part on page you need to follow the below steps. 1 Log in as the SharePoint Global Administrator or SharePoint Administrator. 2.  Log in and navigate to your site collection ("https://xyz.sharepoint.com") and under the site settings activate the below features.   Site settings – site features – SharePoint Server Publishing .   Site Settings – Site Actions – Manage site features- SharePoint Server Publishing Infrastructure.                For this, you also need to enable Custom site scripts on your site collection(But In Modern SharePoint Its not recommended to enabling custom site scripting)  For this go to the  SharePoint Admin center – Settings -  Classic settings page (op...

Update SharePoint list item using JSOM.

In this blog, we are going to learn how to update the SharePoint list item using the JSOM. To update the SharePoint list item or delete it, we can do this using the help of item id. Here we are performing an operation on the list named "Info", which have two columns "Name" and "Address".  Replace "***.sharepoint.com" with your tenant URL and replace the ListItemID with your item id. var clientContext = new SP.ClientContext('***.sharepoint.com'); var oList = clientContext.get_web().get_lists().getByTitle('Info'); var oListItem = oList.getItemById(listItemID); oListItem.set_item('Name','xyz');  oListItem.set_item('Address','xyz');  oListItem.update(); clientContext.executeQueryAsync(Function.createDelegate(this, this.ItemUpdate), Function.createDelegate(this, this.onQueryFailed)); function ItemUpdate(){ alert('Item updated'); } function onQueryFailed(sender,args){ alert('...

Delete Item from the SharePoint list using JSOM.

In this blog, we are going to learn, how to delete SharePoint List item using JSOM/JavaScript. We are going to delete the list item from the SharePoint list using the ID. var clientContext = new SP.ClientContext("URL of your sharepoint tenant"); var oList = clientContext.get_web().get_lists().getByTitle('Title list '); oListItem = oList.getItemById(1)); oListItem.deleteObject(); clientContext.executeQueryAsync(Function.createDelegate(this, this.onQueryDelete), Function.createDelegate(this, this.onQueryFailed)) after successful execution of the function, it calls the onQueryDelete function and when it get failed it throws an exception. Happy Coding!!!!!

Insert item in list using CSOM SharePoint

To insert item into list using csom code. You can create a consol application using visual studio and also use the code mentioned below. You can interact  with sharepoint list using JSOM,CSOM or using rest api. List operation using csom. using Microsoft.SharePoint.Client;  using System;  using System.Collections.Generic;  using System.Linq;  using System.Security;  using System.Text;  using System.Threading.Tasks;  namespace ConsoleApp1 { class Program { static void Main(string[] args) { using (ClientContext clientContext = new ClientContext("insert url upto list")) { string Uname = "Your ID"; string password = "Password";  SecureString Securepasseord = GetSecureString(password);  clientContext.Credentials = new SharePointOnlineCredentials(Uname, Securepasseord); clientContext.ExecuteQuery(); List oList = clientContext.Web.Lists.GetByTitle("metalist");  ListItemCreationInformation listCreationIn...