How to store linked items in DB

I'm using a TDBPlanner in plDay mode and a data source in dmMultiResource mode. I want to link items from two or more resources so that appointments are kept in sync. I'm setting Item.LinkedItem between the items I want linked, and I have a LinkedKey field in the data source to which I am writing the LinkedDBKey.


My problem is how do I restore the linked items when the datasource changes? My dataset queries back all items for the specified day and in the OnFieldsToItem, I am setting Item.LinkedDBKey to the LinkedKey value. But this does not restore the linked items for me.

Is there a different way I should be storing the links in the DB? 

Regards,
Laurence Bevan


In the OnItemsRead event, call:

Planner.Items.ResolveLinks