.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 Set a list item's createdby or modifiedby field as a User(deleted from AD)

Posted By:      Posted Date: August 27, 2010    Points: 0   Category :SharePoint


I have to migrate data from SQL DB to SP list. But its old data and some users who created/modified the record has been deleted from the AD. Now I need to set the CreatedBy / ModifiedBy Field of the item accordingly. How to achieve this?

And when I tried to modify the "Editor" and "Author" field through Object Model, it works. But its not working through Webservice. What is the reason behind this?

Please help me find an optimal solution for this...


Thanks and Regards,

/* John JB */

View Complete Post

More Related Resource Links

Video: Field and List Item Validation in SharePoint 2010

SharePoint supports the ability to create Excel-like field validation formulas to validate field data in a list, which greatly reduces the amount of custom code that a developer must create and deploy. (Length: 1:44)

Updating a List item field value in a SPD Workflow is setting Date fields to null

Hello everybody,I faced a very weird behavior while creating a workflow in SPD against a Document Library.Here is the case:1- Create a document library in sharepoint site.2- Add a custom column of type DATE.3- Upload any document to the library4- Edit the item metadata and set the custom date field to any date you want.5- Now using sharepoint designer, create a very simple Workflow with only one action that updates the current item "Title" field to any value. (Note: In my case I set the workflow to start manually and not automatically)6- Save the workflow and then start it on the uploaded item.7- Now check the value of the date column after the workflow is finished.8- You will see that the Date field is Empty... (very weird)Notes:   1-This behavior will not appear on a standard list. it is only appearing in a Document library.  2- I am using WSS 3.0 SP2 + MOSS 2007 SP2. Also SharePoint designer 2007 SP2Did anyone face this situation and does it have a fix, or am I doing something wrong here... Please help.Regards,Maheed

No item exists at Url. It may be deleted or renamed by another user problem

Hello  all,   I am using strListUrl = subSite.Url + "/" + strSubstring + "DispForm.aspx?ID=" + listitem["ID"] for redirecting the user the list item. But it says the No item  exists at Url. It may be deleted or renamed by another user problem. After some research I came to know, I can't use ?ID=. from http://support.microsoft.com/kb/972225/en-us. Can anyone tell me, what the article is saying or Anyone has any solution.

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

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?

Cross site lookup field value contains the parent list item id and the title field separated by ;# i

Actually we are using third party component for cross site lookup and facing the problem with cross site lookup field value. Its showing the correct value in default list view mode, but in "Edit in Datasheet" and "Export to Datasheet" view cross site lookup field value contains the parent list item id and the title field separated by ;#. I need the actual value in "Edit in Datasheet" and "Export to Datasheet" view as shown in default list value, i dont want that appended parent list item id and separated by ;#.

Is there any OutOfBox soluiton for this. Please suggest me for the same.


difference between Set Field in Current Item versus Update List Item?

Is there a technical different between Set Field in Current Item and  Update List Item if the field in the item being updated with in the same list the workflow is attached to?  It seems like there wouldn't be any difference - that you could use one or the other.  But I'm having trouble with my workflow.  It completes without error, but the field in my current list item isn't being updated (getting the value from another list in same site).
There are no mistakes; every result tells you something of value about what your are trying to accomplish.

Task list item(s) not deleting when List Item Deleted


Sharepoint 2007 SP2
I am the Site Collection Admin and Owner of the site

I have a Infopath forms library that uses a workflow associated with a task list. When I delete the infopath form, due to rejection, the Task list items do not delete. I have to delete them manually. I know this is not the way Sharepoint works. Is this a Microsoft call support issue?

This is same issue is also happening on regular custom list associated with a task list.


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?   

how to programatically retrieve permission of a user on a list item?



            is it possible to retrieve the permission of a user on a list item programatically.? i mean if a user has the rights Contirbute on the list item can i get that programatically that he has Contribute rights?

 please help. your help is appreciated.


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? 

C#: How to Add Item to SharePoint list using web services? One of the field is a choice field.


I have a code that looks something like this:



batch.SetAttribute("OnError", "Continue");
batch.SetAttribute("ListVersion", "1");
batch.SetAttribute("ViewName", "{GUID of my View}");

batch.InnerXml = "<Method ID='1' Cmd='New'>" +
"<Field Name='Title'>Something</Field>" +
"<Field Name='Status'>Something Else</Field> </Method>";

myList.UpdateListItems("{GUID of my List}", batch);


the field name "Status" is a choice field. When i execute this code, my program doesn't add anything to my sharePoint List. However when I remove the 

"<Field Name='Status'>Something Else</Field>

which means i'm left with this code:


How do I add user entered item to choice list items programmatically?


Hi friends,

I have been a share point developer for five months and I have a question that how to add user specified values to choice items.

Here  I ill give you the short probelm definition.

I have the list named as "Emloyee list" with two fields, are "Name" and "Offices".

The value for the field is "Name" is to enter bye the user (E.g: Kumar)

After that the field "Offices" is the choice list with the default items("Office1,Office2,Office3..) and the user has selected the option as Office2.

Now the the list has one row of information as

Name         Offices

Kumar        Office1

Like wise we can add the list items.

In the ablove context for the field "Offices" I need to add the choice items dynamically so that the user no need to follow up the asusal strategy that.. By selecting Settings->List itemsettings->selecting column name.. add the 4th choice option like "Office4"..

I hope u understand my requirement.

Can anybody please help me in this regard.

Thanks in advance,



No item exists at. It may have been deleted or renamed by another user.

I've searched and seen 5 older unsolved posts regarding this question and I'm hoping someone has stumbled onto an answer since.  I use windows auth. in SharePoint and while managing permissions for a single list instance (so a user can edit/view just this instance), it correctly sends the email with the link to the user, but when the recipient clicks the link in the email I get the following error.  If I click the link it works fine since I have access to any list instance.  Anyone solved this?  I've seen one post off-site that says they had to rebuild the form to get it to work.  I really like to avoid that since it is quite large and would take some time.

No item exists at http://server/sites/Security/Lists/Incidents/DispForm.aspx?ID=211.  It may have been deleted or renamed by another user.

Web Parts Maintenance Page: If you have permission, you can use this page to temporarily close Web Parts or remove personal settings. For more information, contact your site administrator.
Troubleshoot issues with Windows SharePoint Services.



Creating Sites/Lists/List Items under Current User Context in SharePoint By Using SPUserToken

Usually we do this by performing the action under RunWithElevatedPrivileges method and updating the listitem using SPListItem.SystemUpdate() method (see here). but this approach has its own flaws like (RunWithElevatedPrivileges will run under system account, we cannot use SystemUpdate for SPSite,SPWeb,SPList, since it runs under system we will "CreatedBy" by as SystemAccount).

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?

show sub item to user



         I have a form where I took 2 dropdownlists. In 1st ddl I displayed all Religions and in 2nd DDL I displayed related castes. When my user filled the form so everything saved it. But when user logged in I unable to show him his choosen caste. Religion I displayed throgh RellgionId. But I don't understand how to do that?


      Can anyone tell me where I am doing mistake?



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