Showing posts with label SharePoint2010. Show all posts
Showing posts with label SharePoint2010. Show all posts

Thursday, November 30, 2023

Get SharePoint all users from in the Group Using the Group Name or Group Id

 In this blog I am explaining how to get all uses form SharePoint group using Name and Id with REST

Get All Users from Groups Name

"_api/web/sitegroups/getbyname('" + groupname + "')/users/"

Get All Users from Groups ID

"/_api/web/sitegroups/GetById(" + groupID +")/Users"

Suppose If you getting Groupe Name from textbox and in will contain special character such as "&" or you can use the Group-id method

var groupName = encodeURIComponent(groupname);
_spPageContextInfo.webAbsoluteUrl + "/_api/web/sitegroups?
                    $filter=LoginName eq '" + groupName + "'"

Additionally If you need to group details related to the the login user use following method

"/_api/web/sitegroups?$filter=substringof('" + groupname + "',LoginName)"



Tuesday, August 6, 2019

_spPageContextInfo in JavaScript object model

What is _spPageContextInfo SharePoint JavaScript Object Model?

In JavaScript Object Model _spPageContextInfo is a main object use to key values like user name, siteurl, userid,etc. 

  • _spPageContextInfo.webabsoluteurl - Absolute URL of the current Web
  • _spPageContextInfo.userid - User Id of login user
  • _spPageContextInfo.userloginname - user name of login user

You can learn more about the _spPageContextInfo for followings blog codesharepoint.com

In some occasions  "_spPageContextInfo is not defined" error occurs in above error explain in above also

Sunday, March 24, 2013

WebTemplate’s in SharePoint 2010


It is a New Feature Introduce in SharePoint 2010 can use as a Sandbox solution architecture
* Its allows deployment at site collection level
* Most of "Site Definitions" features are in the web template
* Web templates were based on existing site definition
* It Does not support Document Templates
* Only one Configuration
* It is best approach to control environment

WebTemplate Element

It specifies the default behavior the template
There are 3 required attributes
    - BaseTemplateID
    - BaseTemplateName
    - BaseConfigurationID
    - Name
Optional Attribute
    - Titke
    - AlternateCssUrl
    - CustOmJS

Onet.xml

It contain NavBars and Configuration Elements but not ListTemplate, DocumentTemplate, Modules, ServerEmailFooter
like Site Definition

One Configuration

Some attributes of project are superseded by WebTemplate attribute

It use features instead of Module

Sunday, September 9, 2012

Friday, January 14, 2011

Edit or Delete a Column from the SharePoint2010 list


So We have Created the List call "StudentContacts" List using Contact Using the Contact Template if you need  go to blog post How Create Simple Contact Us List In sharepoint 2010. Today I show you How to Delete a Column from the SharePoint list. for that I'm using "StudentContacts" Which we have created earlier So that go to that List
(1) Site Action  > Select (2)View all  Site Content  > Select (3)StudentContacts