Hi Fernando. First I'd like to comment you have excellent questions. I hope my answers are of good use to you and other developers.
- To change the parent, you have to explicitly remove the RealWorkItemHierarchyLink and create a new one. Note that prior to the removal of the link you may have to remove dependencies as well.
- References to pickup tables are direct (no link involved). You can directly set the value (as always reference values are of type EntityId. For pickups, the value is the value name, e.g. TypeName = "TrackStatus", Value = "Off Track")
- Relationships between Clarizen Entities can be direct (Referece to Object field) or through a link (obviously for many <-> many relationships). Sometimes you have both a link and a reference field (e.g. Parent), but the reference field is read only, so you need to work through the link. In general:
If there's a link entity describing the relationship, you have to use it.
The link's main reference fields cannot be updated. You need to add a new link (and possibly delete the current one)
If the relationship is described with a direct reference field, you can update its value with the corresponding EntityId.
I know this is a bit complicated as a generic answer. It may be easier to deal with a particular relationship, so the answer can be as simple as "use this link/reference". Please refer to the Clarizen data model wiki page, or add a post/comment in this forum.
4. Yes, the parent of a document is set on the appropriate AttachmentLink (e.g. WorkItemAttachmentLink)
5. It is possible for some of the messages to succeed and some of them to fail. If you want to process several messages as a single operation, consider using TransactionMessage, to bundle them. As the name suggests, if any of the messages in a TransactionMessage fails, the entire TransactionMessage is rolled back. BTW, TransactionMessage _inheritsfrom _BaseMessage meaning you can send several TransactionMessage_s+ other messages in a single _Execute call.
Hope this helps,