您的位置:首页 > 其它

深入浅出Nintex——新增、更新和删除列表中的条目

2010-11-27 21:45 597 查看
新增(New)

<Batch PreCalc='TRUE' OnError="Continue">
<Method ID="1" Cmd="New">
<Field Name='ID'>New</Field>
<Field Name='ID'>Mingle</Field>
</Method>
</Batch>


更新(Update)

代码

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<UpdateListItems xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<listName>{Common:ListName}</listName>
<updates>
<Batch OnError="Continue">
<Method ID="1" Cmd="Update">
<Field Name="ID">{ItemProperty:ID}</Field>
<Field Name="FileRef">{Common:WebUrl}/{Common:ListName}/{Common:ItemDisplayName}.xml</Field>
<Field Name="BaseName">test</Field>
</Method>
</Batch>
</updates>
</UpdateListItems>
</soap:Body>
</soap:Envelope>


删除(Delete)

<Batch PreCalc='TRUE' OnError="Continue">
<Method ID="1" Cmd="Delete">
<Field Name='ID'>{WorkflowVariable:ItemID}</Field>
</Method>
</Batch>


If you need to delete an item from a document library you will need to use CAML and only the URL of the document should be sufficient

<Batch OnError="Continue"> <Method ID="1" Cmd="Delete">  <Field Name="ID">1</Field>  <Field Name="FileRef">http://{servername}/{LibraryName}/document.xml</Field> </Method></Batch> If you are trying to delete an item inside a list  then you nedd to ahve the id an you can construct the caml something like this\

[code]<Batch OnError="Continue"> <Method ID="1" Cmd="Delete">  <Field Name="ID">1</Field> </Method></Batch>

扩展阅读:http://connect.nintex.com/forums/thread/6929.aspx[/code]
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: