Save Method (RPC)

Applies to: SharePoint Foundation 2010

Adds or modifies an item in a list, or modifies properties for a folder or for a file in a document library.

This method is deprecated and may not be supported in future releases. Instead, use the following Web service method:UpdateListItems(String, XmlNode) Web service method.

<Method ID="Text">
  <SetList Scope="Request">GUID</SetList>
  <SetVar Name="Cmd">Save</SetVar>
  <SetVar Name="ID">[New|Integer]</SetVar>
  <SetVar Name="NextUsing">URL</SetVar>
  <SetVar Name="urn:schemas-microsoft-com:office:office#
        Column_1_Name">Value</SetVar>
  <SetVar Name="urn:schemas-microsoft-com:office:office#
        Column_2_Name">Value</SetVar>
  .
  .
  .
  <SetVar Name="owsfileref">URL</SetVar>
  <SetVar Name="owsnewfileref">Name</SetVar>
  <SetVar Name="fileupload0">URL</SetVar>
</Method>

Parameters

Parameter

Description

ID = "Text"

Application-specific string. In an HTML editor that is compatible with Microsoft SharePoint Foundation 2010, such as Microsoft SharePoint Designer 2010, the string provides the sequence number and name of the method.

Scope = "Request"

When set to Request, the Scope attribute sets the variable for the scope of the enclosing Method element, unless the variable is changed by another tag.

Name = "Cmd"

Must be set to Save.

Name = "NextUsing"

Optional. The URL to which the user is redirected after the operation is completed.

Name = "ID"

Set to New to create a new item, or set to the integer ID of the item to modify.

Name = "urn:schemas-microsoft-com:office:office#Column_Name"

Specifies the name of a column in which to add or modify a value. Depending on the list and the operation being performed, different columns may be specified.

The following columns are used by default in operations on various lists.

Create or modify items in the Announcements list.

  • Title   Text specifying the title of the item.

  • Body   Text specifying the message body of the item.

  • Expires   DateTime value in ISO8601 format that specifies the expiration date. For example, 2003-06-16T18:37:44Z.

Create or modify items in the Contacts list.

  • Title   Text specifying the last name.

  • FirstName   Text specifying the first name.

  • Email   Text specifying the e-mail address.

  • Company   Text specifying the company.

  • JobTitle   Text specifying the job title.

  • WorkPhone   Text specifying the work phone number.

  • HomePhone   Text specifying the home phone number.

  • CellPhone   Text specifying the cell phone number.

  • WorkFax   Text specifying the work fax number.

  • WorkAddress   Text specifying the work address.

  • WorkCity   Text specifying the city where the contact works.

  • WorkState   Text specifying the state where the contact works.

  • WorkZip   Text specifying the zip code for where the contact works.

  • WebPage   Text specifying the URL for a Web site.

  • Comments   Text specifying comments about the contact.

Create or modify items in a discussion board.

  • ThreadID   GUID specifying the thread ID of the discussion.

  • Ordering   Text specifying the timestamp of a discussion. The ordering of an initial comment is a string such as 20031211164930, and the ordering of a reply is a string that includes the initial ordering, such as 2003121116493020031211164951. To modify an existing discussion board item, specify the ID of the item through the ID parameter, the thread ID of the discussion through the ThreadID parameter, and the ordering of the item through the Ordering parameter. To create a reply in an existing discussion, specify New as the value of the ID parameter, specify the thread ID through the ThreadID parameter, and use the Ordering parameter to specify the ordering of the comment responded to. To create a new discussion, specify New as the value of the ID parameter and pass an empty Ordering parameter.

  • Title   Text specifying the subject of the discussion item.

  • Body   Text specifying the message body of the discussion item.

Edit the name of a file or folder.

  • Title   Text specifying the title for the file or folder. Use the owsfileref parameter to specify the URL for the file or folder, and the owsnewfileref parameter to specify a new name. The ID of the file or folder must be specified through the ID parameter.

Create or modify an event item.

Parameters common to all event items:

  • Title   Text specifying the title of the event.

  • EventDate   DateTime value in ISO8601 format that specifies the beginning date and time for the event. For example, 2004-06-15T09:00:00Z.

  • EndDate   DateTime value in ISO8601 format that specifies the ending date and time for the event. For example, 2004-06-30T10:00:00Z.

  • Description   Text specifying the description of the event.

  • Location   Text specifying the location of the event.

Parameters common to recurring events:

  • RecurrencePattern#Type:fRecurrence   Integer specifying the type of recurring event. Possible values include the following:

    • 0 — None

    • 2 — Daily

    • 3 — Weekly

    • 4 — Monthly

    • 5 — Yearly

  • RecurrencePattern#windowStart:fRecurrence   DateTime value in ISO8601 format that specifies the start date for a recurring event. For example, 2004-06-15T09:00:00Z.

  • RecurrencePattern#EndDateRangeType:fRecurrence   Integer specifying the type of range that determines the end date of the event. Possible values include the following:

    • 0   No end date.

    • 1   End after a specified number of occurrences. Requires that RecurrencePattern#repeatInstances:fRecurrence be specified.

    • 2   End by a specified date. Requires that RecurrencePattern#windowEnd:fRecurrence be specified.

  • RecurrencePattern#repeatInstances:fRecurrence   Integer specifying the number of instances for a recurring event.

  • RecurrencePattern#windowEnd:fRecurrence   DateTime value in ISO8601 format that specifies the end date for a recurring event. For example, 2004-06-30T09:00:00Z.

Daily recurring events:

  • RecurrencePattern#daily_dayFrequency:fRecurrence   Integer specifying the daily frequency of an event. For example, 2 specifies every 2 days.

Monthly recurring events:

  • RecurrencePattern#MonthlyRecurType:fRecurrence   Integer specifying the type of monthly recurrence. Possible values include the following:

    • 0 — Day Integer of every Integer month(s). Requires that RecurrencePattern#monthly_day:fRecurrence and RecurrencePattern#monthly_monthFrequency:fRecurrence be specified.

    • 1 — The [first | second | third | fourth | last] [Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday] of every Integer month(s). Requires that RecurrencePattern#monthlyByDay_weekOfMonth:fRecurrence, RecurrencePattern#monthlyByDay_day:fRecurrence, and RecurrencePattern#monthlyByDay_monthFrequency:fRecurrence be specified.

  • RecurrencePattern#monthly_day:fRecurrence   Integer specifying the day of the month for each occurrence when RecurrencePattern#MonthlyRecurType:fRecurrence equals 0.

  • RecurrencePattern#monthly_monthFrequency:fRecurrence   Integer specifying the monthly frequency when RecurrencePattern#MonthlyRecurType:fRecurrence equals 0. For example, 3 specifies every 3 months.

  • RecurrencePattern#monthlyByDay_weekOfMonth:fRecurrence   Integer specifying the week of the month for the occurrence when RecurrencePattern#MonthlyRecurType:fRecurrence equals 1. Possible values include the following:

    • 0 — first

    • 1 — second

    • 2 — third

    • 3 — fourth

    • 4 — last

  • RecurrencePattern#monthlyByDay_day:fRecurrence   Integer specifying the day(s) of the week for the occurrence when RecurrencePattern#MonthlyRecurType:fRecurrence equals 1. Possible values include the following:

    • 0 — Sunday

    • 1 — Monday

    • 2 — Tuesday

    • 3 — Wednesday

    • 4 — Thursday

    • 5 — Friday

    • 6 — Saturday

  • RecurrencePattern#monthlyByDay_monthFrequency:fRecurrence   Integer specifying the monthly frequency when RecurrencePattern#MonthlyRecurType:fRecurrence equals 1. For example, 4 specifies every 4 months.

Weekly recurring events:

  • RecurrencePattern#weekly_weekFrequency:fRecurrence   Integer specifying the weekly frequency of an event. For example, 2 specifies every 2 weeks.

  • RecurrencePattern#weekly_multiDays:fRecurrence   Integer specifying the day of the week on which the weekly occurrence takes place. Possible values include the following:

    • 0 — Sunday

    • 1 — Monday

    • 2 — Tuesday

    • 3 — Wednesday

    • 4 — Thursday

    • 5 — Friday

    • 6 — Saturday

Create or modify an item in an issues list.

  • Title   Text specifying the title of the issue item.

  • Status   Integer specifying the status of the issue. Possible values include the following:

    • 1 — Active

    • 2 — Resolved

    • 3 — Closed

  • Priority   Integer specifying the priority of the issue. Possible values include the following:

    • 1 — High

    • 2 — Normal

    • 3 — Low

  • Category   Integer specifying the category of the issue. Possible values include the following:

    • 1 — Category 1

    • 2 — Category 2

    • 3 — Category 3

  • AssignedTo   Integer specifying the ID of the user to whom the issue is assigned.

  • Comment   Text specifying a comment for the issue.

  • DueDate   DateTime value in ISO8601 format that specifies the due date for the issue. For example, 2004-06-30T09:00:00Z.

  • RelatedIssue   Integer that specifies the ID of a related issue.

Create or modify a link in a links list.

  • URL   Text specifying the absolute URL of the link followed by a comma (,), a space, and the text to be displayed for the link. If displayed text is not specified, the URL string is displayed.

  • Comments   Text specifying notes for the link.

Create or modify an item in a tasks list.

  • Title   Text specifying the title of the task.

  • Status   Text specifying the status of the task. Possible values include the following:

    • Not Started

    • In Progress

    • Completed

    • Deferred

    • Waiting on someone else

  • Priority   Text specifying the priority of the task. Possible values include the following:

    • High

    • Normal

    • Low

  • PercentComplete   Decimal number representing the percent completion of the task.

  • AssignedTo   Integer specifying the ID of the user to whom the task is assigned.

  • Body   Text specifying the message body of the task item.

  • StartDate   DateTime value in ISO8601 format that specifies the start date for the task. For example, 2004-05-30T09:00:00Z.

  • DueDate   DateTime value in ISO8601 format that specifies the due date for the task. For example, 2004-06-30T09:00:00Z.

Name = "owsfileref"

Optional. Specifies the server-relative URL of the file or folder whose name is to be changed. Use the owsnewfileref parameter to specify the new name. The ID of the file or folder must be specified through the ID parameter.

Name = "owsnewfileref"

Optional. Specifies a new name for the file or folder specified by the owsfileref parameter.

Name = "fileupload0"

Specifies the path for an attachment to add for an item.

Decoded

  1. Add a reply to an item in a discussion board.

    <Method ID="0,DiscSave">
      <SetList Scope="Request">D1292FB0-20C9-4270-B5D9-5F2ECC6C597D</SetList>
      <SetVar Name="Cmd">Save</SetVar>
      <SetVar Name="ID">New</SetVar>
      <SetVar Name="urn:schemas-microsoft-com:office:office#ThreadID">20031212-0429-16B3-919B-E69D9248868B</SetVar>
      <SetVar Name="urn:schemas-microsoft-com:office:office#Title">Text</SetVar>
      <SetVar Name="urn:schemas-microsoft-com:office:office#Ordering">2003121120293620031211204403</SetVar>
      <SetVar Name="urn:schemas-microsoft-com:office:office#Body">Text</SetVar>
    </Method>
    
  2. Create a new event that occurs between 10 a.m. and 12:30 p.m. on the second Tuesday of the month every two months during the year 2004.

    <Method ID="0,Save">
      <SetList Scope="Request">c3fb93d0-2632-4b72-a0e2-1f571b869814</SetList>
      <SetVar Name="Cmd">Save</SetVar>
      <SetVar Name="ID">New</SetVar>
      <SetVar Name="urn:schemas-microsoft-com:office:office#Title">Monthly Meeting</SetVar>
      <SetVar Name="urn:schemas-microsoft-com:office:office#EventDate">2004-01-01T10:00:00Z</SetVar>
      <SetVar Name="urn:schemas-microsoft-com:office:office#EndDate">2005-01-01T12:30:00Z</SetVar>
      <SetVar Name="urn:schemas-microsoft-com:office:office#RecurrencePattern#Type:fRecurrence">4</SetVar>
      <SetVar Name="urn:schemas-microsoft-com:office:office#RecurrencePattern#MonthlyRecurType:fRecurrence">1</SetVar>
      <SetVar Name="urn:schemas-microsoft-com:office:office#RecurrencePattern#monthlyByDay_weekOfMonth:fRecurrence">1</SetVar>
      <SetVar Name="urn:schemas-microsoft-com:office:office#RecurrencePattern#monthlyByDay_day:fRecurrence">2</SetVar>
      <SetVar Name="urn:schemas-microsoft-com:office:office#RecurrencePattern#monthlyByDay_monthFrequency:fRecurrence">2</SetVar>
      <SetVar Name="urn:schemas-microsoft-com:office:office#RecurrencePattern#EndDateRangeType:fRecurrence">2</SetVar>
      <SetVar Name="urn:schemas-microsoft-com:office:office#RecurrencePattern#windowStart:fRecurrence">2004-01-01T00:00:00Z</SetVar>
      <SetVar Name="urn:schemas-microsoft-com:office:office#RecurrencePattern#windowEnd:fRecurrence">2005-01-01T00:00:00Z</SetVar>
      <SetVar Name="urn:schemas-microsoft-com:office:office#Description">Text</SetVar>
      <SetVar Name="urn:schemas-microsoft-com:office:office#Location">Text</SetVar>
    </Method>
    
  3. Add a task to a tasks list.

    <Method ID="0,Save">
    <SetList Scope="Request">7DDA4B15-CFDE-4098-8288-EE139CC3796F</SetList>
      <SetVar Name="Cmd">Save</SetVar>
      <SetVar Name="ID">New</SetVar>
      <SetVar Name="urn:schemas-microsoft-com:office:office#Title">Text</SetVar>
      <SetVar Name="urn:schemas-microsoft-com:office:office#Status">In Progress</SetVar>
      <SetVar Name="urn:schemas-microsoft-com:office:office#Priority">High</SetVar>
      <SetVar Name="urn:schemas-microsoft-com:office:office#PercentComplete">.2</SetVar>
      <SetVar Name="urn:schemas-microsoft-com:office:office#AssignedTo">17</SetVar>
      <SetVar Name="urn:schemas-microsoft-com:office:office#Body">Text</SetVar>
      <SetVar Name="urn:schemas-microsoft-com:office:office#StartDate">2004-01-01T00:00:00Z</SetVar>
      <SetVar Name="urn:schemas-microsoft-com:office:office#DueDate">2004-01-14T00:00:00Z</SetVar>
    </Method>