Hi,
So the function has the following parameters:
-
collectionName - name of the collection that contains the referring item (e.g. if the collection B has a reference field to the collection A, then the collection A will be the name to insert).
-
propertyName - the property to insert the reference into (column id in database A).
-
referringItem - The referring item or referring item’s ID.
-
referencedItem - The referenced item, referenced item’s ID, an array of referenced items, or an array of referenced item IDs.
You can see complete description with an example here .