SharePoint List UpdateListItems Not Updated

I am posting an update to UpdateListItems. It returns success, but the ahs list item is not updated. Any tips on how I will keep track of what is going wrong?

The following is generated XML:

<Batch OnError='Continue' ListVersion='1' ViewName=''>
   <Method ID='1' Cmd='Update'>
      <Field Name='ID'>11707</Field>
      <Field Name='Business_x0020_Area'>Consumer</Field>
      <Field Name='Team'>6;#IT Support</Field>
      <Field Name='Job_x0020_Number'>TEMP</Field>
      <Field Name='Media_x0020_Outlet2'>13;#BBC Parliament</Field>
      <Field Name='Publication_x0020_Date'>2009-09-01 14:40:10</Field>
      <Field Name='Narrative2'></Field>
      <Field Name='Page_x0020_Number'>1</Field>
      <Field Name='Media_x0020_Value'></Field>
      <Field Name='Information_x0020_Only'>0</Field>
      <Field Name='Date_x0020_Added'></Field>
   </Method>
</Batch>

Update

The error I get in U2U is

0x81020014 One or more field types are set incorrectly. Go to the list settings page to remove these fields.

+3
source share
4 answers

I had an internal field in CAML that is not in the database. This made him tip over.

+2
source

- , "-", "Business_x0020_Area". , , xml , . . , . - YYYY-MM-DDTHH: MM: SSZ. Z . , .

+1

401 , , , . , "" script .

0

-

public DateTime dateForSp(string s)
{
    string[] sd = s.Split('/');
    string[] yd = sd[2].Split(' ');
    string[] hd = yd[1].Split(':');

    DateTime dt = new DateTime(Int32.Parse(yd[0]),
                               Int32.Parse(sd[0]),
                               Int32.Parse(sd[1]),
                               Int32.Parse(hd[0]),
                               Int32.Parse(hd[1]),
                               Int32.Parse(hd[2]));

    return dt;
}

"<Field Name='SubmissionTime'>" + String.Format("{0:u}", dateForSp(this.rProperty["SubmissionTime"])) + "</Field>" 
0

Source: https://habr.com/ru/post/1716598/


All Articles