The SharePoint Manager 2010 is a SharePoint object model explorer. It enables you to browse every site on the local farm and view every property. It also enables you to change the properties.
Really very useful for SP developers and admins!
You can download Sharepoint Manager 2010 from Codeplex.
SharePointAds TextOnly
Thursday, 30 September 2010
Wednesday, 25 August 2010
How to get approvers user name in workflow?
When you assign workflow task to any group and how would you get task approvers user name? Task list can show only 'assigned to' column which will give you group name only.
You can fetch approvers user name by creating custom List item event receiver for task list. Create Item updated event receiver and add following code...
*Note: Create new column for workflow task list. I created new column with 'ApprovedBy1' name.
You can fetch approvers user name by creating custom List item event receiver for task list. Create Item updated event receiver and add following code...
public override void ItemUpdated(SPItemEventProperties properties)
{
base.ItemUpdated(properties);
SPListItem oListItem = properties.ListItem;
oListItem["ApprovedBy1"] = properties.UserDisplayName;
oListItem.Update();
}
*Note: Create new column for workflow task list. I created new column with 'ApprovedBy1' name.
Labels:
Custom Event reciever,
Sharepoint,
workflow
Saturday, 7 August 2010
How to Edit User Profile in Sharepoint 2010?
If You have to modify user profile information from 'People and Groups' option in Sharepoint site then you can't directly edit user profile information. Even on edit user page you will see only non editable data.
User profile information can be change from 2010 central administration site. Follow the steps to modify user profile or user properties.
User profile information can be change from 2010 central administration site. Follow the steps to modify user profile or user properties.
- Login Central Admin site
- Click on 'Application Management' option menu from left navigation
- In 'Service Application' section, click on 'Manage service applications' link
- From this serviceappliction page, click on 'User Profile Service Application' link
- And then you can see lots of options for people, synchronization, Organizations, My site settings etc etc,
- On same page, under People section click on 'Manage User Profiles' link
- find the user and click on User name from below grid, select 'Edit My Profile' option
- You can change user profile on edit form.
- Click on 'Save and close' button
By default it could take up to some time to reflect the new updated information througout all web applications bound to the user profile service application. A timer job is taking care of this and you could kick this one of to run manually once by going to "Check Job Status" screen in Central Admin (http://site/_admin/Timer.aspx).
Monday, 26 July 2010
Sharepoint : How to Edit List Item's Default forms from UI?
How we can edit Sharepoint's List Item forms( NewForm.aspx, DispForm.aspx or EditForm.aspx) from UI? By default there is not any option in Site Setting tab to edit form.
If you want to edit List Item default forms on UI then there is another way...
Just add below line in URL..
After adding this statement in URL, you can edit page or add new web parts on default list items page.
If you want to edit List Item default forms on UI then there is another way...
Just add below line in URL..
&ToolPaneView=2
After adding this statement in URL, you can edit page or add new web parts on default list items page.
Tuesday, 18 May 2010
Sharepoint 2010: Remove 'All Site Content' and ‘Recycle Bin’ link
You can remove 'All Site Content' and ‘Recycle Bin’ link from sharepoint site by doing some change in master pages. Follow the following steps to remove both links from every pages.
Save the changes in file. Now it will affect on every
- Open ‘v4.master’ file from C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\GLOBAL (If you have only MOSS then in \12\TEMPLATE\GLOBAL ) or If you are using your custom master page then edit your custom master page.
- Find </head> , above </head> add following code
Save the changes in file. Now it will affect on every
Monday, 3 May 2010
Populate all Sharepoint Document Library names which has my custom Content types
Today I populated all document library names which has my custom content type in drop down list control in web part.
(So before start further, I am assuming that you have created any document library with custom content type in visual studio 2010.)
Lets starts with creating simple web part template in VS 2010 and on user control page (in .ascx) add ASP.net dropdown control with name 'ddlCategory'
<asp:DropDownList ID="ddlCategory" runat="server" > </asp:DropDownList>
and on usercontrol.ascx.cs page, add following function code on 'page_load'
public void PopulateDocNames()
{
ArrayList listWithMyCT = new ArrayList();
using (SPSite objSite = new SPSite("http://YOURSITE:PORT/"))
{
using (SPWeb objWeb = objSite.OpenWeb())
{
foreach (SPList list in objWeb.Lists)
{
if (list is SPDocumentLibrary && list.ContentTypes["Custom_Content_Type"]!= null)
{
listWithMyCT.Add(list.Title);
}
}
}
}
ddlCategory.DataSource = listWithMyCT;
ddlCategory.DataBind();
}
Note: Change YOURSITE:PORT and Custom_Content_Type with your site URL with port and your custom content type name.
Labels:
Content Type,
Document Library,
Sharepoint
Thursday, 22 April 2010
How to insert item in Sharepoint list using javascript and Sharepoint web services
We can store insert items in Sharepoint items using many ways like using Sharepoint object model etc. But I need to insert items with Javascript.
I googled lot but didn't get any useful infomation, only Jan tielens' Blog has some infomation which showing list data on page using jQuery.
Finally I created the solution which stores the text box value in the Sharepoint list on button click. Following steps will show step by step information.
- Create the blank web part page in your sharepoint site.
- Browse this web part page
- Edit page by clicking on site action -> Edit page
- In any web part zone, click on 'Add a web part' then add 'Form Web part', Modify this web part.
- Click on source editor button, it will open new window to add your content.
- I added a HTML textarea and button with simple javascript which will store textarea value in given sharepoint list.
- (Before that create new custom list with any name as you wish. I created with name 'Suggestions'
- On source editor, copy and paste following code
<script type="text/javascript">function addSuggestion(SuggestionText) {var xmldoc;var batch;var FeedbackHTTP;var ListName = 'Suggestions';//The batch variable builds up the XML that we are going to submit to the SharePoint list via the SharePoint web servicebatch = "<batch><method id="'1'" cmd="'New'"><field name="'Title'">" + SuggestionText + "</field></method></batch>";xmldoc = '<?xml version="1.0" encoding="utf-8"?><soap:envelope xsi="http://www.w3.org/2001/XMLSchema-instance" xsd="http://www.w3.org/2001/XMLSchema" soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:body><updatelistitems xmlns="http://schemas.microsoft.com/sharepoint/soap/">'xmldoc = xmldoc + '<listname>' + ListName + '</listname>';xmldoc = xmldoc + '<updates>' + batch + '</updates></updatelistitems></soap:Body></soap:Envelope>';FeedbackHTTP = new ActiveXObject("MSXML2.XMLHTTP.3.0");FeedbackHTTP.Open("POST", "http://YourSiteURL/_vti_bin/Lists.asmx?op=UpdateListItems", true);FeedbackHTTP.setRequestHeader("Content-Type", "text/xml; charset=utf-8");FeedbackHTTP.setRequestHeader("SOAPAction", "http://schemas.microsoft.com/sharepoint/soap/UpdateListItems");FeedbackHTTP.Send(xmldoc);alert("Thank you! your suggestion has been submitted successfully.");}</script><textarea cols="15" id="txtSuggetion" rows="6"></textarea><input id="myButton" onclick="javascript:addSuggestion(txtSuggetion.value);txtSuggetion.value = '';" type="button" value="Submit" />
- (Note: Change YourSiteURL with your site name)
- click on save button.
- this will give you text area, insert any comment in text area then click on Submit button.
- Now check your 'Suggestions' list. New item store with textarea value as in title.
Subscribe to:
Posts (Atom)