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

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

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

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

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!


View Complete Post

More Related Resource Links

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


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?

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?

Create discussion list item from another (non-discussion) list item ?

I am looking at creating a custom list to track bugs. I would like to have a comments/description field that either embeds or links to a discussion. is there a way to automate the creation of a discussion item from the bug list item or is the process 1) create bug list item 2) create discussion item 3) paste URL of discussion list item in 2) to the comments field/column in 1) All opinions/thoughts/advice appreciated regards, Counie

Workflow - automatically create discussion item using title field of of custom list item as its subj

Anyone any ideas as to how I can configure SharePoint to create a discussion item using the title of a list item. e.g. user creates list item on a custom list - SP automatically creates a Discussion thread for this list item in the discussions list. I'm guessing this can't be down OOTB . would I be looking at SPD or a coded solution ? regards, Counie

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!

Create list and allow only one item per user


I'm trying to create a list where each user can only create one item, and change the item he has created.

I also need the list to allow each user to view only his own item

When I create a custom list and configure it so that each user can only view and edit his items and after that I try to configure a column validation to allow only different values it gives me an error saying that a list where a user can only see his items cannot have that type of column validation.

I was trying to use this type of validation on a column because I had the column to be auto-filled by the new/edit form (customized via infopath) with the user's username, that way I could ensure that only one item per user would ever exist. However, since I am not allowed to configure the column validation this way, I can't go this route.

Is there a simple way to achieve the effect I am looking for?

Create workflow to create list item in calendar list of a DIFFERENT site collection


I work for a school district.  Each school has a SharePoint calendar.  We set up each school as its own site collection.  I would like to create a workflow that would send their calendar events to a district calendar, which is also its own site collection.

Example,  School A enters creates a new item on their personal school calendar.  They click YES in the column called SendToDistrictCalendar.  The workflow would be triggered to create this same item in the district calendar (which is in a different site collection) when SendToDistrictCalendar is checked YES.

We're using Windows Server 2003 with Windows SharePoint Services 3.0

I am a mid-level SharePoint user.  I would appreciate ANY and ALL help to make this work!!


How to send a link to list item by email in SharePoint 2010?


With SharePoint 2007 list item display form is openned in broswer and user can either copy and paste the url and send the link by email or use the browser's "Page" button and click "Send the link by email" to send the link.

With SharePoint 2010 list item display form is openned in a dialog box, the browser doesn't show the list item url and the browser's "Page" button's "Send the link by email" just sends a link to the list not the list item.

We don't want to diable the dialog box either. Please help.

Create "add new item" link to open in dialog


Rather than use the default "Add new item" link for a list I'd like to create my own link at the top of my page or from the quicklaunch. The issue I'm seeing is then when I copy the link from the system created link and then paste it into a custom link is that it opens in a new page rather than in a dialog.

Can someone help me out on this? Thanks very much.

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



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?


How to use Designer to create a WF to collect data and update item in the list



I’m trying to create a workflow in SharePoint Designer 2007 to finish the item in the list. In the list, I setup 10 fields (Name, Address, Phone#....), and in the workflow, I set it to start automatically when a new item added in the list (I can add a new Name in the list to start the workflow).


In the step1:

The Conditions is: “If Address is empty”.

The Actions is: “Collect all data from lw1990 (Output to Variable: collect1)


At this point, I don’t know how to update the current item in the list with the data that just collected from user in Variable:

Workflow - Create New List Item with lookup field


I have an 'Item list' that has 'ItemName' as a string. The Workflow creates a new 'Task' when a new Item is created. The 'Task' has 'Item Name' as a lookup to that 'Item list'.

I want the Workflow to "Create New List Item" and fill in the 'ItemName' lookup (in Task) with the 'ItemName' string (in Item).

The workflow won't do it because they are different 'types'. Is there a way around this?   

Create List Item - error message



We have recently purchased oneplacemail and I have setup a list that takes the email metadata and stores it, what I wanted to do is a workflow that fires off when a new record is added to the list (i.e. when a new email is dropped in)...and create a new record on another list holding this information and allowing users to add more data to other fields.

I have created a workflow in SPD that uses the CREATE LIST ITEM action, I've set which fields from the email-drop list to populate the fields in the other list and it all seems fine.

I've tested it out and I just get two generic errors -

DESCRIPTION - Error updating a list item
OUTCOME - Unknown Error

DESCRIPTION - An error has occured in <workflow name>

I wondered if it was because the field types for the columns in the email-drop list are not the same as the field types in the other list...even though the data that I want it to create would hapily go in there.  For example, one of the email-drop list columns is EmTo, containing metadata from the TO field of the email...this holds the data as <surname>, <forename>....which is exactly how it is held in the other list except that the field type is PERSON OR GROUP.

This is Sharepoint 2007.

How to create list item on different site calendar after workflow approval

I have a vacation request located on our corprate home page that is available to all departments.  we have more department sites within the same site collection, each having their own calendar.  I am wondering if its possible to have the workflow create a list item on a different site calendar IF the department equals "other department".  So all departments submit the vacation request from the home site, then when it is approved the calendar in their department is updated.

Create list item in library - Output variable



I want to create workflow in SPD, that create new item in document library.

I use Create list item on library (output to Variable:create)

The documenty was created sucessfully, but the output didn't return the ID of item created.

In the documentation says, that function return the ID of item created.

Is maybe some other way, to get the ID of new created item in document library.


Best regards

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