from zope.component import getUtility
from zope.intid.interfaces import IIntIds
from z3c.relationfield import RelationValue
intids = getUtility(IIntIds)
source.relatedItems = [RelationValue(self.intids.getId(target))]
source.relatedItems
Plone/IRelatedItems- How can I programatically set relatedItems of a dexterity content type?