May 18, 2010 at 3:07 PM
Edited May 21, 2010 at 2:17 PM
I'm in the process of converting a blog into sharepoint. The source blog is Movable type, i've exported the data and loaded it into a vs2008 project, where it's now stored in a class, all still linked together internally (posts/comments etc)
I've managed to populate the posts list via web services on the sharepoint side, using the UpdateListItems method. This has worked perfectly and i've migrated all the posts. Now, when I come to migrate the comments, I need to populate the "post id"
field on the comments list in sharepoint, to tie the comments back to the post. I'm having trouble with this, as it doesn't appear to populate using the following CAML:
<Method ID='1' Cmd='New'><Field Name='Body'>body text</Field><Field Name='PostID'>1234</Field></Method>
This works, and inserts a row, only the PostId field is empty. So I end up with lots of orphaned comments which aren't attached to a post. If I create a manual comment against one of my imported blog entries, it correctly populates the PostID field.
If I change the Field Name to be Post_x0020_Id or other derivatives, it doesnt insert and reports:
0x81020014One or more field types are not installed properly. Go to the list settings page to delete these fields
which generally means one of the specifield CAML fields is wrong.
...So.. if I can get the insert to work, why isn't it showing properly? Am i understanding the list relationships correctly?
This is the final piece to the puzzle and without it my blog migration stops dead... can anyone help? I'm hoping so!
EDIT: looking further into it, it may be that I need to populate the lookup field "PostTitle" on the comments list which links back to the Posts list.... currently investigating the population of lookups via CAML ;)