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.
Create or modify items in the Contacts list.
Create or modify items in a discussion board.
Edit the name of a file or folder.
Create or modify an event item. Parameters common to all event items:
Parameters common to recurring events:
Daily recurring events:
Monthly recurring events:
Weekly recurring events:
Create or modify an item in an issues list.
Create or modify a link in a links list.
Create or modify an item in a tasks list.
|
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
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>
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>
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>