.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

How to perform actions right after new list item was created?

Posted By:      Posted Date: October 19, 2010    Points: 0   Category :SharePoint


I've created custom attachment field, so this field collecting file names from user when user creates new list item. Well, i got local file names list, i know how to upload them to library, but i need to upload them right after list item was created ( i need to assign uploaded files to this new item by its ID ). Something like item attachments works, files uploads after ( or durnig - not sure ) new item created.

btw, i cant use workflows because files are at client side.

Any ideas?


View Complete Post

More Related Resource Links

Dynamic list item title based on date created & regional settings?

I have a list of things that doesn't *need* a title.  However, because sharepoint uses Title for links, RSS etc  I tried generating a title in an event handler.   This would work great if I wasn't basing it on a date field: public override void ItemAdding(SPItemEventProperties properties) { DateTime dt = Convert.ToDateTime(properties.AfterProperties["TestDate"]); properties.AfterProperties["Title"] = dt.ToShortDateString(); base.ItemAdding(properties); } In testing, this sets the title to "8/9/2010" when I selected 8/10/2010 in the date picker.  I figure this is because of the regional settings of my test user.  I can probably correct the title value for 'test user' but that won't fix 'test user in mongolia' who would still see two different values. So What I would like is to have the Title always display the value MyDate in the uesr's locale.  So the field needs to be dynamic not only at edit/update time, but at display time. Does anybody know if this can be accomplished, and more specifically how?

How to remove 'Delete Item' from context menu of a programmatically created list?

How to remove 'Delete Item' from context menu of a programmatically created list?
I have document library which is created programmatically but now I don't want to have 'Delete Item' in context menu of that document library. Are there any possibilites?

How to copy a Column data from one List to another list whenever a new item created .


Hello ,


I have List A and List B

List A


Ticket ID

Column A

Column B

Column C


List B


Ticket ID

Column 1

Column 2

Column 3

I want to copy only Ticket ID from List A to List B , whenever a new item created in List A.

can you please give your thoughts?

how to do it?

Thanks in Advance!


Share Knowledge and Spread Love!

How to Create Sharepoint Workflow (designer) on Calender List when a new list item is created



I need to create a sharepoint designer workflow on Calender List.The functionality is that, Workflow on Calendar list that sends an e-mail notification each time new event is created along with event details.

Any help appriciated..



Srikanth Reddy


Create a link to the most recently created item in a list.


Hi all,

I have a list, that a user must re-visit several times a day.

I have a web-part page that contains a series of URL links to the above list (each link is clicked on at a different time of the day).

The idea is that the first link takes the user to NewForm.aspx to create a new list item for that day, but I then want the other links that they click on later in the day to take the user to the SAME list item they created earlier.

i.e. EditForm.aspx?ID="the one they created at the start of the day".

How can this be acheived? Do I need to determine the last item in the list (which would always be the one they need to re-visit)? Do I create some kind of workflow that stores the date and time stamp and then is called in the URL as a parameter when passed to the EditForm.aspx page?

The user would be the only one working on this list during any given day, so there's no danger of a different user "intercepting" a list item first.

Thanks in advance!


Insert URL of item created in new list item


I have a calendar list that when an item is added I need to add a list item to an issues list and include the url of the item added in the original calendar list.  I have the workflow that creates the list item in the issue list, but how can I obtain the URL and append that to text in the "Comments" column?

Any help would be greatly appreciated.

David Dye http://sqlsafety.blogspot.com/

No title displayed in the "New" item creationfor a list based on a created list template.


Hello everybody,

I have a problem with a sharepoint list template. I created a custom list in MOSS2007 that I saved as template. The problem is that the new list based on that saved template doens't display the Title (changed on project's name) when I want to create a new item. So after creating new items, their Project's Name (Title) is set to (none) for all of them because I couldn't specify any Project's Name (Title).

I was back to my original list and when I create a new item, the Project's Name is displayed so I can fill it. I searched in the list settings and nothing was special.

The columns are required in both lists, there is no management of content types (maybe a hidden field but NO!), the list is a typical list with basic settings.

Has someone an idea?

I want to reuse this list and the Project's Name (Title) is very important (!).


Thank you.

How to send an email to Supervisor (field in the form) after New Item in a list is created?


I have user who creates a record and User's Supervisor, who need to get notification about new record (different Users have different Supervisors and they input them manually into field when create a new record).

(Users I've mentioned are domain users with emails assigned to them and we use Outlook that is integrated with our sharepoint)


1) I've tried to create a workflow in Sharepoint Designed (as described here: http://social.msdn.microsoft.com/forums/en-us/sharepointdevelopment/thread/2A525E2F-2407-42C9-AB9D-B5FB609B34B5) , but there I can choose only concrete email address (I need it to be populated from the field on the form).

I think the workflow can be configured somehow to send an email to user from a field, but I don't know how. 


2) I've created a new view with filters by Supervisor and configured Alerts for the view, but it is too complicated for all Supervisors to do that. (just not the best solution)


any ideas? 

problem...i want a list item to populate all data in gridview!!!


i have a dropdownbox and a gridview

what I want is to have a list item which populates all data in a gridview.

I have tried using list item selected value=0 but to no avail.

what is the easiest way to achieve this?

Attach Workflow to Task List, don't get option to manually start workflow via dropdown on task item



I am running WSS 3.0 with other workflows which are functioning correctly.  I created a new workflow in Visual Studio 2008 and was able to successfully run it in my dev environment.  I attached the workflow to a task list in my dev environment and was able to manually start the workflow by using the drop down workflow option and using the menus to manually start it.  I installed this workflow in our production environment and attached it to the task list (which had a SPD workflow attached to it which stopped working about a month ago).  I made sure that the option to manually start the workflow was checked.  When I tried to manually start the workflow, (hover mouse over title, drop down) there isn’t a workflow option.  The workflow also will not start automatically when a task is changed.


I attached this same workflow to a different task list in production and get the option to start it.


I have tried creating a small workflow in SPD 2007 and attaching it to the task list.  It shows that it is attached, when I look at the workflows that are attached to the task list, but I still don’t get the option to manually start it.


I have checked my security and I have fu

Workflow "Failed on Start (retrying)" when new item created by BizTalk SharePoint Adapter


We've been using the BizTalk SharePoint Adapter to load various different contents into a MOSS 2007 Document Library. The library has a Microsoft Office SharePoint Designer 2007 workflow (sequential workflow created in Designer) which starts automatically when a new item is added to the Document Library. Or, at least, it eventually starts automatically.


For some unknown reason--and this is what we're hoping some of you may have some ideas on--the workflow fails to start on the first try, producing the "Failed to Start (retrying)" message. When the timer job comes back the second time, the workflow starts successfully, but this causes us to loose five minutes of potential work time (not to mention making us look bad to the VPs and CTO because they see the failure message).


In checking the log, I find the following pair of error messages each time the "Failed to Start (retrying)" status occurs:


08/27/2007 13:49:43.24  w3wp.exe (0x0CA0)                        0x1438 Windows SharePoint Services    Workflow Infrastructure        72fs Unexpected RunWorkflow: Microsoft.SharePoint.SPException: <Error><CompilerError Line="1" Column="1" Text="The root activity type is invalid.&q

Workflow Task And Relevant List Item


Hello there...

1. What is the name of  the field thats connect between the task item and  the list name or guid and the list item id or guid

2. SPD: how can when starting the workflow how can i ensure that the initial form variables will be saved at the workflow task list

Many Thanks



Assigning users when creating a list item in a workflow


I'm using a workflow to assign tasks to users.  When I try to assign the task to a group (set in the workflow designer), the workflow gives me an error.  When I change the assign to property to a single user, the workflow works perfectly.  How do I get the workflow to assign the task to the group?  Or if that's not possible, can I get it to assign it to more than one user?


KPI to calculate list item clicked most ?


Hello All:

Is there anyway where we can use KPI list to attach to a SharePoint list and indicates which item was clicked the most ? Or any other way to find out the best 5 links based on how many times they were accessed by a user?


Thanks in advance

SharePoint Developer

Concurrent update in sharepoint list item



How the concurrent for sharepoint list item are are handled.

if two or more users are working on same item. Then how sharepoint process multiple update request for particular list item.

link from one list item to another item in the same list?


I have a list in which it is possible for one item to be related to another list item in the same list.  I am trying make a column in the list which would contain a hyperlink to the related list item.  The primary column is called Bill Number, and the secondary column is Companion Bill Number .  The Companion Bill Number is the one I want to be a hyperlink to the list time in which that number is the primary Bill Number.  (hope that made sense!). 

I thought I could create a hypertext link out of the Companion Bill Number dynamically in a workflow action that runs on item creation.  I tried this by using the string builder to create a string for the hypertext link that I set to a workflow variable.  It looks like this  <a href="listURL.aspx?ID=[%Bill:CompanionBill%]">[%Bill:CompanionBill%].  Then in another action in the same workflow I tried to set the CompanionBill column to the variable value. 

What I ended up with was, instead of the number as a hyperlink, the text in the column reads as [%Bill:CompanionBill%].  I'm thinking this is failing because of the workflow process doesn't have the value of CompanionBill at the time I am asking it to set the variable value.

Any ideas on how I might make this dynamic link creation work?

When editing a list item the fields are not blank.


This is a recent issue that I have in which I have a "Issue Tracking" List that maintains the workflow of contract renewals.

When an person goes to edit an existing list entry, the description field (standard) has the original text in the box. Prior to this the original - or any older text from a prior change was listed outside and just below the box - and non editable.

That's not the case anylonger.

Any thoughts?



ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend