This question comes up quite often. If you are building a SharePoint workflow (either Sequential or StateMachine) using Visual Studio 2010 and if you sometime want to check the status of your task using code then you can simply use the following code to achieve that.
The above code runs OnTaskChange Activity and uses Task AfterProperteis to get the Task Status.
Pretty Simple !!!
Microsoft have published a great article on PowerShell for SP2013 learning roadmap. You can go to the article by clicking the image below.
I would highly recommend this article to anyone who is new to SharePoint and wants to learn PowerShell.
If you have installed SP 2013 environment and trying to use My Sites you may see the following error.
This could be for multiple reasons. First read the following article and make sure you have followed steps mentioned in it for configuring your My Site.
If you have followed these steps correctly then it may be because of server is running low on resources.
I was thinking of writing a blog post on Step by Step State Machine Workflow. Lately I am busy with work and hence did not get chance.
I will definitely write that article in near future but meanwhile you can have a sample State Machine Workflow Project which I have created.
State Machine Workflow Sample
This is just a sample for your learning purpose only. This has not been tested for production use and this sample contains no warranties.
If you are uploading a File to SharePoint 2010 programmatically and wanted to get the ID of that newly created file then you can use following code.
//Upload your File
SPFile myFile = spList.RootFolder.Files.Add
(FileUpload1.PostedFile.FileName, StreamImage, replaceExistingFiles);
Odintsovo SPListItem http://koolkoncepts.com/air-conditioning/ac-repair/ item = imgFile.Item;
// Then you can use item.ID
I am not providing full code for file upload but the key here is to get SPListItem from SPFile class.
I hope it helps.
This one was tricky.
If you ever want to set default value for Enhanced Rich Text Box you can use following Jquery.
$('nobr:contains("Desc")').closest('tr').find('input[id$="TextField_spSave"]').val('Hello World !!!');
This is copied from the thread below.
If you want to insert HTML inside you can simply inesert your HTML as part of setting up value.
val(‘<table border=”1″><tr><td>Hello </td><td><b>World !!!</b></td></tr></table>’);