无法填充查找类型列。任何的想法?

时间:2014-04-30 19:33:37

标签: web-services sharepoint lookup

我正在使用以下xml代码(copy.asmx>方法CopyIntoItems)。每个Microsoft http://msdn.microsoft.com/en-us/library/websvccopy.copy.copyintoitems(v=office.14).aspx我也应该能够更新查找字段值,因为查找列表位于同一个子网站上,源库和目标库也在同一个子站点上。任何的想法?除了查找列之外,项目将获得副本并填充所有列。我验证了ID和值匹配查找值。 (顺便说一下http就在那里我不得不把它拿出论坛规则的b / c)

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap="schemas.xmlsoap.org/soap/envelope/" xmlns:m="schemas.microsoft.com/sharepoint/soap/">
  <soap:Header>
  </soap:Header>
  <soap:Body>
    <m:CopyIntoItems>
      <m:SourceUrl>internal.col.com/sales/bymonth/Active/0973410.pdf</m:SourceUrl>
      <m:DestinationUrls>
        <m:string>internal.col.com/sales/bymonth/NonActive/0973410.pdf</m:string>
      </m:DestinationUrls>
      <m:Fields>
        <m:FieldInformation Type="Text" DisplayName="Sales Code" InternalName="SalesID" Value="99999"></m:FieldInformation>
        <m:FieldInformation Type="Text" DisplayName="Sales Person Name" InternalName="FullName" Value="TEST, John S."></m:FieldInformation>
        <m:FieldInformation Type="Choice" DisplayName="FileSection" InternalName="PersonnelFileSection" Value="1- New Hire Paperwork, ECA, Termination, LOA"></m:FieldInformation>
        <m:FieldInformation Type="Choice" DisplayName="FileCategory" InternalName="PersonnelFileCategory" Value="Termination Paperwork"></m:FieldInformation>
        <m:FieldInformation Type="Text" DisplayName="Year" InternalName="Record_x0020_Year" Value="2014"></m:FieldInformation>
        <m:FieldInformation Type="DateTime" DisplayName="Effective Date" InternalName="Anniversary" Value="04/22/2014 00:00:00"> </m:FieldInformation>
        <m:FieldInformation Type="Choice" DisplayName="Status" InternalName="Current_x0020_Status" Value="Terminated"></m:FieldInformation>
        <m:FieldInformation Type="Lookup" DisplayName="AreaCode" InternalName="AreaCode" Id="cdae6ca0-d49c-4971-a580-2adcd7a282f1"  Value="4;#1795004"></m:FieldInformation>        
        <m:FieldInformation Type="Text" DisplayName="Title" InternalName="Title" Value="TEST"></m:FieldInformation>
      </m:Fields>
      <m:Stream>base64Binary</m:Stream>
    </m:CopyIntoItems>
  </soap:Body>
</soap:Envelope>

1 个答案:

答案 0 :(得分:0)

尝试添加LookupId="true"并仅传递查找ID:

<m:FieldInformation Type="Lookup" DisplayName="AreaCode" InternalName="AreaCode" LookupId="true" Value="4">