I would like to know if there is a way to compare two lists of triContactRole records and find the records that are not in both lists. The case is as follows: (1) One list of triContactRole records is associated to the triCapitalProject object. (2) The other list of records is associated to the triPurchaseOrder object. (3) So I would like to copy the triContactRole records from capital project to purchase order, but only those that do not already exist in purchase order. Is there any way to do that?
One way might be to have a workflow where a Query task grabs all of the resulting contact role records associated to the capital project record. Then have an Iterator (Iter) task that goes through each of those records. Within the Iter, you can have another Query task grabbing the contact role records of the purchase order record using the Iter record as a filter. Then have a Switch task that says if the result count of the second Query task = 0, then create the contact role record for the purchase order record.
[Admin: To see other related posts, use the Iterator tag.]