Project Description Share Point Tips Utility Pack is a package of utilities for the administrator\developer\deployer of Share Point 2007 and WSSv3.
Originaly each tool was written to quickly solve a specific problem in a sharepoint deployment project, it can now be viewed as a code sample for sharepoint coding on various tasks.
The context is removed by design to encourage people not to use it.
You should try to use the properties that are exposed as much as possible to avoid compatibility issues later.
In fact, when you test the code in an event receiver for a list, the Http Context is returned, but when you tried with a document library the context is null.
You can catch the Http Context in both SPList and Document Libraries, if you upload the document from the Share Point Interface (Internet Explorer).
There is a way to obtain the HTTPContext in Document Libraries to access the HTTPContext. Thanks for your help Here is the code: I faced the same issue when I was trying to update some custom fields of my document library when uploading new documents, the field was (Project ID) which I put it inside a session in my webpart (the step before uploading the document).
What I did is: I put the The Item Adding method and all *ing methods in an event receiver are synchronous, and you can catch there the context of the HTTP request.
Resulting error Only a Share Point-aware developer can understand this message that comes out of the box from Share Point.I’m trying to obtain the HTTPContext within an Event Handler in a Document Library in MOSS, but all I have is a null value of the HTTPContext.Current, I do the same thing on a List and the HTTPContext is returned.So if anything else is changed the workflow will not start unless the 'approval' value is. Thanks, Check if the two values are not equal to each other, and if the updated value is equal to "approve".If both are true, start a workflow on the list item programmatically- here are some links to help you with that: coding!If the value equals what you want then run the worlflow. If the email is being received with any modification then you have got your flow wrong.Martin's solution is very straightforward but you can also expand on this by using content types to allow for an approval process that performs another action.Share Point as most us know, has built in workflow capabilities.In SP 2010, workflows have been made pretty obvious.Ali, Thanks, but this is something I already have set up.The problem is that after the value is updated, everytime the item is changed (other columns that the one that trigger the workflow) the workflow restars, and in my case re-sends an email (it was set up to Actions: send an email). Thanks, You probably need two workflows, a hidden field and a "Start another workflow activity" (which can be found on Code Plex) Workflow 1 is a helper workflow which is set to start when an item is changed: It check if Status is equal to hidden field If it is the exit If not then start workflow 2 and set hidden field to current value of Status Workflow 2 is then the real workflow which does what you want when Status is changed @Marius: The first step in the workflow should be to compare the field value and provide a logic branch.To view the previous state would be slightly messy.In Share Point 20, we can write event receivers that are triggered on the occurrence of a specific event, such as when an item is added or deleted from a list or library and so on.It includes : It is my hope that the community will not only learn from these code samples and use them to ease their life, but also that developers will add new tools to this package, making all our lives easier.