3.1.4.27 UpdateContentType

The UpdateContentType operation<81> is used to update a content type on a list.

 <wsdl:operation name="UpdateContentType">
     <wsdl:input message="UpdateContentTypeSoapIn" />
     <wsdl:output message="UpdateContentTypeSoapOut" />
 </wsdl:operation>

The protocol client sends an UpdateContentTypeSoapIn request message (section 3.1.4.27.1.1) and the protocol server responds with an UpdateContentTypeSoapOut response message (section 3.1.4.27.1.2), as follows:

  1. If the specified listName is a valid GUID and corresponds to the identification of a list on the site, use that list.

  2. If the specified listName is not a valid GUID or does not correspond to the identification of a list on the site, check if the listName corresponds to the list title of a list on the site and, if so, use that list.

  3. If the specified listName does not correspond to a list from either of these checks, a SOAP fault SHOULD<82> be returned with error code 0x82000006. This indicates that the list does not exist or might have been deleted by another user.

  4. If the contentTypeId is not a valid content type identifier or is not the content type identifier of a content type on the list, the protocol server MUST return a SOAP fault. There is no error code for this fault.

  5. If the specified content type is found, the protocol server deletes the appropriate fields from the content type. If the fields to be deleted do not exist in the specified list, the protocol server MUST return a Response with error code 0x82000007. This indicates that the fields specified in the deleteFields element do not exist in the specified list, and all fields that were deleted before the error was encountered MUST stay deleted.

  6. The protocol server adds the appropriate fields to the content type. If the fields to be added do not exist in the specified list, the protocol server MUST return a Response with error code 0x82000007. This indicates that the fields specified in the newFields element do not exist in the specified list, all fields deleted from the content type MUST stay deleted, and all fields added to the content type before the error was encountered MUST stay added to the content type.

  7. The protocol server updates the appropriate fields on the content type. If the fields to be updated do not exist in the specified contentType or they do not exist in the specified list, the protocol server MUST return a Response with error code 0x82000007. This indicates that the fields specified in the updateFields element do not exist in the specified contentType or do not exist in the specified list, all fields deleted from or added to the content type MUST stay deleted or added, and all fields updated on the content type before the error was encountered MUST stay updated on the content type.

  8. The protocol server updates the content type with the given properties. If an error is encountered during this operation, the protocol server MUST return a SOAP fault. The fields that were deleted, added, or updated MUST stay deleted, added, or updated and all properties updated before the error was encountered MUST stay updated.

If changes to the content type are allowed according to the permission settings on the list, the protocol server MUST NOT carry out operations other than deleting, adding, or updating fields.