.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

Attempt to update Modified field with UpdateListItems() return 0x81020030

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :C#

I have written a custom migration tool using SharePoint web services to move SP content from 2003 to 2007. I'm using solution suggested by Steve Curran 



to set the tp_Modified field to Read_Only="False", update the Modified field with UpdateListItems(), then set back to Read_Only. This solution is working perfectly for SharePoint Versions and However moving to a new SharePoint instance, 12.0.06545, the call to UpdateListItems returns 0x81020030. ("Invalid file name"). This fails only for document libraries.





View Complete Post

More Related Resource Links

SharePoint Batch Update Auto Increment Field Value


Hello All,

I am making use of SharePoint List Batch Updating methodology in order to update the items in bulk. I build the query dynamically for each and every item using StringBuilder and process the data ultimately using 'ProcessBatchData' Method.

Now, I have a requirement where I have to increment a particular field value in the query while iterating through each item for building the query. How can I auto-increment a field value for each item in the batch query?


Client Object Model - cannot retrive "Modified By" field value

Hi, I am using Client Object Model to get all items from a list and display theme with "Modified By" information. Everything works nice until I start using test users. I have noticed that for user who is in Domain Admins group i have no problem for others I cannot read "modiefied by" field value. var context = ClientContext.Current; activitySPList = context.Site.RootWeb.Lists.GetByTitle("Activities") activityItems = activitySPList.GetItems(CamlQuery.CreateAllItemsQuery()); context.Load(activityItems); context.ExecuteQueryAsync( ClientRequestSucceeded, ClientRequestFailed ); All items in activityItems collection doesn't have "Modified By" fields. Do you know why and how to fix it? Thanks for your help.

Endless update loop after return of customDataSet in UpdateHandler

I have created a custom conflict handler for merge replication that responds to Inserts and Updates from both the Publisher and the Subscriber.  This is a prototype so the tables involved are limited. Unfortuntely, I get into an endless loop of updates back and forth. I respond to the Inserts and Updates because the SiteIndex of sites in the tblSites table are different on the two replication databases but their SiteID is the same.  When transferring records from the tblGroups table, I need to look up the SiteIndex and translate it to the right value for the target (Publisher vs. Subscriber).  Here’s the code for the Update:   public override ActionOnDataChange UpdateHandler( SourceIdentifier updateSource, DataSet updatedDataSet, ref DataSet customDataSet, ref int historyLogLevel, ref string historyLogMessage ) { int siteIndex = (int)updatedDataSet.Tables[0].Rows[0]["SiteIndex"]; int translatedSiteIndex = 0; if ( updateSource == SourceIdentifier.SourceIsPublisher ) { translatedSiteIndex = TranslateSiteIndex( PublisherSites, SubscriberSites, siteIndex ); } else if ( updateSource == SourceIdentifier.SourceIsSubscriber ) { translatedSiteIndex = TranslateSiteIndex( SubscriberSites, PublisherSites, siteIndex ); } if ( translatedSiteIndex != 0 ) { customDataSet = updatedDataSet.Copy(); customData

Team Discussion Modified by field not working

Hello, I have a team discussion board set up which uses a threaded format. However, my issue is with the Modified by field. I believed this would show me the last user that had replied to a discussion but the field continues to display my user name since I was the creator of the discussions in the first place. Am I using the wrong field? Something tells me that the columns I have to choose from are all in regards to to discussions and not to the message replies themselves. In the end, I'm looking for something very similar to your forums here. Discussions should be displayed with title, created by, timestamp, last user who replied and timestamp.Beth Singley PBM Graphics

Update field Linq

HelloI want to update one field of one record using linq. I use below codeDim p1 = (From p In db.Products_          Where p.ProductID= 1320 _                 Select p).Single        p1.CategoryID= p1.CategoryID+ 1        db.SubmitChanges()The issue is above query first execute select command and then Update command. and then update all fields of selected record. and this cause overflow to DB.I need to only update one field value. How Coudl I get below sql command. (only update one field)update Productsset CategoryID= CategoryID+ 1where ProductID=1320

Update a field in a gridview to False on a Button Click

 Hi, Ive got a list of records in a gridview (from an SQLDataSource) where a field value is set to True.  I've also added a "reset" button in a template field at the start of the row in the Gridview. What I would like to do is allow the user to click the reset button on a particular row and 'reset' the true value to 'false' (updating the source data). Are there any idiot proof tutorials to do this??? Many thanks for your help! Fiorano

How do you update a Lookup Field from CAML by Name rather than ID

Hi, I have the following batch update in my code: xml += "<Method ID='" + currentID + "' Cmd='Update'>"; xml +=   "<Field Name='ID'>" + ID + "</Field>"; xml +=   "<Field Name='FileRef'>" + fileRef + "</Field>"; xml +=   "<Field Name='Title'>" + doc.NewFileName + "</Field>"; xml += "<Field Name='Keywords'>" + doc.Keywords + "</Field>"; xml +=   "<Field Name='Select_x0020_Type'>" + ((doc.TypeName == "General") ? 1 : 2) + "</Field>"; xml +=   "<Field Name='Population'>" + "Demography" + "</Field>"; xml += "</Method>"; The Population field is a lookup. It works if I put the ID of the ListItem in there, but not if I put the name - I need to put the name in. Can anyone help? Thanks. John.  

Update Managed Metadata Field with using Lists.asmx service

Hello! I am trying to update Managed Metadata Field with using Lists.asmx. I know that I must use this format WSSID;#VALUE|GUID. But I don't Know how I can get WSSID and VALUE Guid! Can I get them with using lists.asmx! Thanks!!

Can I update Project Field value via some javascript?

Hi there, I've a webpart that's designed to update some project field value, this webpart is  located on a Project Details Pages. On this project details page, there is another MS Build-in webpart call Project Field webpart. Now when I clicked the Save ribbon button, the project field webpart will raise some client calls, at the same time my custom webpart will raise a post-back(update value via PSI) call which will kill the client calls..So is it possible for me update the project filed value via some javascript? so I'll no longer raise a postback. Or is it possible for me to capture the client calls event for MS webpart, then I can fired my own PSI code? Thank you,   Regards, Joe

event receiver to update created field of uploaded document

Hi,   I need to update the created column with the document creation time . 1) First should i use ItemAdding event or Item Added event 2) how do i get the file created properties and assign it to the cdocument library created column.

Generic ListItem Field Update function?

Just wondering: is there a built-in utility function to set field value for any field type? E.g., SetFieldValue(SPListItem, object value1, optinal object value2, optional object values) You know so boring to update fields considering so many different types. I bet MS guys did one somewhere!? thanks,

Multiline text field in document library and item update from Word trouble

Hi I have faced a bit of odd problem. Here is the scenario: I have document library with text columns (multiple lines of text) that are set to unlimited length. I have a workflow that runs with Word documents (.docx) that stores information in XML to this field. Everything works perfectly until document is edited in Word and saved back to document library. After Word saves my document in document library, the multiline text field is "cutted", only 7 rows of text is saved to my field. I have tried hiding my text field, making it sealed or readonly, but still Word breaks my field. Funniest thing is that when editing document in Word, this field should not have any changes (meaning that I dont show my "long text field" in document information panel back in Word). I have tried also creating event handler to handle itemupdating event in document library where I switch spweb.parserenabled property to false and in itemupdated event I switch it back on. Also I have tried to remove all line changes from XML with no luck. This XML saving to long text field works perfectly with many other places but in this one environment this does not seem to work :( I am looking forward to any suggestions what to try next. I have been wondering about using the eventhandlers and trying to "protect" my text field with some logic but that is still just a thought.   T

Update duplicate field in same table

  hi I have a table with some other duplicate field as below   IssueID Title A1 Test1 A1 Test2 A2 Test3 A2 Test4 A3 Test5 A4 Test6   i want update all duplicate field based on IssueID and the final result will show as below   IssueID Title A1 Test1 A1 Test1 A2 Test3 A2 Test3 A3 Test5 A4 Test6 may someone help me?  

Fileupload with database parameters that need to return nothing on update

Hi All, Got a problem with regards to the file upload control on database updates. The problem is in my CMS, when a user tries to update content for a page it will add null to the fields containing the image path. What I need is for the system to check if the uploader has no image and if hasn't it has to do nothing. It can't add empty strings or null values as this will remove the original image path. Although they still need to be able to do image updates if the uploader has a file(this bits not a problem). Heres a snipet of code to demonstrate what I'm trying to achieve. protected void Button1_Click(object sender, EventArgs e) { if (Page.IsPostBack) { AddMenu menu = new AddMenu(); string APP_PATH = Server.MapPath(Common.GetAppSetting("_MENU_PATH")); if (FileUpload1.HasFile == false) { menu.Menu_Image1 = /////// Its this bit that has to do nothing //// Menu_Image1 calls a Parameter on the data layer /// Ie cmd.Parameters.AddwithValue("@image", _menu_image1) } else if (FileUpload1.HasFile) { if (FileUpload1.PostedFile != null && FileUpload1.PostedFile.ContentLength > 0) { Uploa

Javascript price update ...hidden field ... asap

Hello Experts http://store.apple.com/us/configure/MC374LL/A?mco=MTc0Njg1ODA Like in this link i created a javascript function  === id , lenght , width , dept , capacity ,price ..<script type="text/javascript">function getproductdetail (id,len,wid,dep,cap,thick,prc)     {          document.getElementById('row1')=prc   }          </script>the same function is called at a new place where i pass only price .. i have to check if there is a price is present in 'row1' i have to add new prc to present one .. =================== thing is where i will retain the old value present .. How to check whether value is prsent in row1 or not ..... if i will choose hidden field where to use and how to check value for that ... Thanks

How to Add&Update the value of manage metadata field in Silverlight using sharepoint client object m


How to Add&Update the value of manage metadata field in Silverlight using sharepoint client object model ??

This is my code :

ClientContext clientContext = ClientContext.Current;
                Web oWebsite = clientContext.Web;
                ListCollection collList = oWebsite.Lists;
                ListItem oListItem;

                List oList = clientContext.Web.Lists.GetByTitle("Employees");

                oListItem = oList.AddItem(new ListItemCreationInformation());
                oListItem["Title"] = "My new item";

oListItem["Geography"] = "Kroea";//This is MetaData Field



the oListItem["Geography"] = "Kroea" must be formatted like oListItem["Geography"] = "2;#Kroea",that code will be worked.

The "2

How to return a specific field from the last record entered


I have two tables, Discrepancies and Actions that are linked by a field called JobNumber

What I need to do in a stored procedure is return a date field from the last record entered in the Actions table where the JobNumber is the same

The Actions tables primary key is an Identity field.

I'm trying to make a subquery but am stuck on the syntax.

Any help would be appreciated, this is just a bit beyond my skill set. Thanks.

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