Sign In
Nishand's Blog
Welcome to my personal blog, All the information in this bogs is my ideas,findings and thoughts on .Net, Asp.Net and SharePoint. ALL POSTING ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND
Translate This Page
Translate this page
Powered by
Microsoft® Translator
Options
About
Email Blog Author
RSS for posts
Atom
RSS for comments
OK
Search
Advanced search options...
Search In:
Everything
Blogs
Forums
People
Groups
Places
Pages
Date range:
All Time
Last Year
Last 6 Months
Last 3 Months
Last Month
Last Week
Last Two Days
Tags
MOSS
SharePoint
SharePoint Workflow
WSS V3
Archive
Archives
September 2009
(3)
October 2008
(1)
August 2008
(3)
June 2008
(4)
September 2007
(2)
July 2007
(1)
May 2007
(11)
November 2006
(1)
August 2006
(1)
MSDN Blogs
>
Nishand's Blog
Posts
Subscribe via RSS
Sort by:
Most Recent
|
Most Views
|
Most Comments
Excerpt View
|
Full Post View
Nishand's Blog
SPWebPartManager doesn't honour the WebPartCancelEventArgs.Cancel value while deleting the webpart
Posted
over 3 years ago
by
nishandv
0
Comments
Some scenarios developers may want to restrict users from deleting webparts from a page, the scenarios varies. SPWebPartManager has got a event named ‘OnWebPartDeleting’.The issue here is, the deletion of the webpart cannot be avoided by setting the WebPartCancelEventArgs...
Nishand's Blog
Setting the property 'AllowMultipleValues' resets the control's type to "Lookup" when it is inherited from SPFieldLookup class.
Posted
over 3 years ago
by
nishandv
0
Comments
When you develop a custom field type that inherits from SPFieldLookUp/SPFieldUser(not sure about any other controls) . The derived field type has its own rendering controls. The issue arises when multiple values are to be stored in a field of the custom...
Nishand's Blog
Issue with Multi Field/Group values and SPWorkflowTaskProperties.ExtendedProperties
Posted
over 3 years ago
by
nishandv
0
Comments
I encountered an issue when assigning a multi-user data to a workflow task field from within the workfflow. There may be various reasons anyone wants to create a User/Group field with multiple values and set it within in the workflow as below, SPWorkflowTaskProperties...
Nishand's Blog
FullTextSqlQuery with QueryText length greater than 4096 characters throws ArgumentOutOfRange exception.
Posted
over 4 years ago
by
nishandv
4
Comments
The max number of characters that can be passed through FullTextSqlQuery is 4096 characters, beyond this length throws an exception ArgumentOutOfRangeException. You will get the same behavior when using the webservice QueryEx(XmlNode) as well. 1: private...
Nishand's Blog
How to implement custom User Profile handler?
Posted
over 4 years ago
by
nishandv
2
Comments
1: namespace MyNewProfileHandler 2: { 3: public class MyUserProfileHandler : MySiteProfileHandler 4: { 5: public override void SetMySiteOwner(Microsoft.Office.Server.ServerContext context, UserProfile profile, string newOwner) 6: { 7: base .SetMySiteOwner...
Nishand's Blog
How to add, remove and start workflow programmatically?
Posted
over 4 years ago
by
nishandv
3
Comments
Removing Association 1: SPSite site = new SPSite( "http://localhost" ); 2: SPWeb web = site.OpenWeb(); 3: SPList list = web.Lists[ "Shared Documents" ]; 4: SPWorkflowAssociation _association = null ; 5: foreach (SPWorkflowAssociation association in list...
Nishand's Blog
How to change the Workflow History list programmatically?
Posted
over 4 years ago
by
nishandv
2
Comments
1: SPSite spSite = new SPSite( "http://localhost" ); 2: SPWeb spWeb = spSite.OpenWeb(); 3: SPList spList = spWeb.Lists[ "Shared Documents" ]; 4: SPList workflowlist = spWeb.Lists[ "NewHistoryLibary" ]; 5: SPWorkflowAssociation association = spList.WorkflowAssociations...
Nishand's Blog
Updating 'ModerationStatus' field
Posted
over 4 years ago
by
nishandv
1
Comments
You might have experienced a road block when trying to the update the ‘ ModerationStatus’ field with other fields. Any attempt to do so will result in an exception “ You cannot change moderation status and set other item properties at that same time ...
Nishand's Blog
SPWeb.GetObject() throws an exception when site context changes.
Posted
over 4 years ago
by
nishandv
0
Comments
Here is the scenario, you may want to get an object(SPListItem) without iterating through the list item collection, if you know the URL of the file the GetObject() returns the item. Section#1 1: 1. SPSite site = new SPSite( "http://nishand:100/sites/RootSite...
Nishand's Blog
How to delete SPRecycleBin items?
Posted
over 4 years ago
by
nishandv
1
Comments
1: SPSite spSite = new SPSite( "http://nishand:100/sites/InternetSite/" ); 2: SPRecycleBinItemCollection collection = spSite.RecycleBin; 3: 4: for ( int x = 0; x < collection.Count ; x++) 5: { 6: collection[x].Delete(); x = x-1; 7: } 8: The above...
Nishand's Blog
What does the SPWeb.ParserEnabled property do?
Posted
over 4 years ago
by
nishandv
1
Comments
When we set SPWeb.ParserEnabled to false, it disables the document parser (there will not be any property demotion and promotion), it means that the file properties and the WSS properties will not be in sync. So when you search for a custom file property...
Nishand's Blog
Changing the SPWorkflowAssociation.AutoCleanupDays property
Posted
over 5 years ago
by
nishandv
3
Comments
By default the SPWorkflowAssociation.AutoCleanupDays property value is set to ‘60’ days, to set this property we need to call the SPList.UpdateWorkflowAssociation(SPWorkflowAssociation) function, SPWeb.Update() won’t work here. 1: SPSite site = new SPSite...
Nishand's Blog
How to hide subsite's GlobalNavigation nodes/tabs through SharePoint API?
Posted
over 5 years ago
by
nishandv
2
Comments
When we create a site either through UI or OM, it will not come as a tab unless you check the option ‘ Sit e Actions-->Site Setting-->Navigation-->Show subsites to true’. On checking the option results in displaying all the subsites as ‘Tabs...
Nishand's Blog
How to create SearchAlert Programmatically?
Posted
over 5 years ago
by
nishandv
1
Comments
Note: Make sure that you have enabled search based alerts SSP-> Search Settings -> Search Based Alerts 1: SPSite spSite = new SPSite( "http://nishand:300/sites/PubSite/Search/" ); 2: SPWeb web = spSite.OpenWeb(); 3: Query alertQuery = new KeywordQuery...
Nishand's Blog
How to set user permissions programmatically?
Posted
over 5 years ago
by
nishandv
0
Comments
1: SPSite site = null ; 2: SPWeb web = null ; 3: site = new SPSite( "http://server:100/sites/DevSite/" ); 4: web = site.OpenWeb(); 5: SPRoleAssignment roleAssignment = new SPRoleAssignment( "domain\\user" , "alias@domain.com" , "Nishand" , "Simple Test...
Nishand's Blog
The InfoPath form's 'Attachment control doesn't work with SharePoint Workflow forms.
Posted
over 5 years ago
by
nishandv
1
Comments
When we use InfoPath form as a workflow form with an attachment control, on selecting a file says that “The selected files was not found”.This seems to be a small bug:) in the product. Note: It's not advisable or supportable to customize out of box files...
Nishand's Blog
How to update Content Types through the Object Model?
Posted
over 5 years ago
by
nishandv
1
Comments
When we add a field to the site content type SharePoint doesn't push-down those changes to the document library and the list level. The below code sample is for push-down all the changes to document libarary and the list level.The sample code from WSS...
Nishand's Blog
When you try accessing the ProjectDrillDownPart reference from a windows/console application returns 'ErrorWebPart' object instead of orginal object
Posted
over 5 years ago
by
nishandv
0
Comments
Per my observation, this behavior is due to some internal expection occured because of HTTPContext.Current is invalid, As a work-around execute the code within a web-based application.
Nishand's Blog
How to create an XMLFormView control in custom aspx page within SharePoint?
Posted
over 5 years ago
by
nishandv
1
Comments
Adding “XmlFormView” control to a custom aspx page that provisioned within SharePoint throws an exception “Session state cannot be enabled here.” XmlFormView control requires session state to be enabled. To enable the session, open the web application...
Nishand's Blog
UserProfileManager object creating fails when we try to create an instance from a SharePoint workflow application.
Posted
over 5 years ago
by
nishandv
0
Comments
A work-around to this issue is, execute the code under admin privileges(impersonate the user), you can either follow the Win API impersonation or using the SPSecurity.RunWithElevatedPrivilages() method. You would get errors like, 'Microsoft.SharePoint...
Nishand's Blog
"User cannot be found." error when creating an FBA site programmatically through Windows application or a console application.
Posted
over 5 years ago
by
nishandv
0
Comments
When we create an FBA site through console app or a windows app, we need to have the membership provider and the role provider information within App.Config file. It would be with the same structure as we have in the web.config file of SharePoint WebApplication...
Nishand's Blog
How to install custom security trimmer?
Posted
over 5 years ago
by
nishandv
0
Comments
1. Shared Services Administration: ShareServices1> Search Setting >Crawls Rules > Add or Edit Crawl Rule Path : http://* Crawl Configuration : Include all items in this path Specify Authentication : Use the default content access account 2. Shared...
Nishand's Blog
Updating UserProfile Property of type ChoiceList
Posted
over 5 years ago
by
nishandv
0
Comments
What I found from my research is, before updating the “ChoiceList” set the “MaximumShown” property to a higher value (depends on how many items you are adding). e.g. using (SPSite site = new SPSite(" http://servername")) { ServerContext context = ServerContext...
Nishand's Blog
How to set SPFolder.WelcomePage property?
Posted
over 5 years ago
by
nishandv
0
Comments
Some SharePoint objects needs an instance to work perfectly, one example is here; Sample 2 works however the Sample 1 doesn't :) Sample1 SPSite site = new SPSite(" http://server:100/sites/InternetSite/ "); SPWeb web = site.OpenWeb(); web.RootFolder.WelcomePage...
Nishand's Blog
Debugging Workflows
Posted
over 5 years ago
by
nishandv
0
Comments
It would be very painful to debugg the workflow, VS provides help to some extend, however for details log information you have to change the web.config for your web application in which the workflow is running under. Open your web.config, Add the below...
Page 1 of 2 (27 items)
1
2