Dim inno as Innovator = getInnovator() Dim ItemId as String = Me.getProperty("item_number") Dim name as String = Me.getProperty("name") Dim docType as String = Me.getProperty("_document_type") Me.fetchRelationships("Document File") Dim rel1 as Item = Me.getRelationships("Document File") Dim count as Integer = rel1.getItemCount() Dim quotationMark as String = Chr(34) Dim k as Integer Dim clonedItem As Item = Me.clone(True) 'true for copy the relationships For k = 0 To count - 1 Dim DocFile as Item = rel1.getItemByIndex(k) clonedItem.addRelationship(DocFile) Next Dim classification as String = Me.getProperty("classification") Dim res2 as Item = clonedItem.apply() Dim clonedItemNumber as String = res2.getProperty("item_number") Dim ResultOnlyOutgoingDoc as Item = Nothing Dim i as Integer For i = 0 To count - 1 If i <> count - 1 Then Dim DocFile as Item = rel1.getItemByIndex(i) Dim whereDoc as String = "[Document].item_number='"+ clonedItemNumber + "' " Dim whereDoc_FILE as String = "[Document_FILE].sort_order='"+ i.ToString() + "' " Dim str as String = "<AML>" + "<Item type='Document' action='edit' where="+ quotationMark + whereDoc + quotationMark +" >" + "<Relationships>" + "<Item type='Document File' action='delete' where="+ quotationMark + whereDoc_FILE + quotationMark +" >" + "</Item>" + "</Relationships>" + "</Item>" + "</AML>" res2 = inno.applyAML(str) End If Next Return res2Was my approach correct? or should I try something different? Thanks in advance, Regards, Maddy.