In this chapter, you’ll learn what Link is and how to use it to manage links.
Note: As of Medusa v2.2.0, Remote Link has been deprecated in favor of Link. They have the same usage, so you only need to change the key used to resolve the tool from the Medusa container as explained below.
The create method accepts as a parameter an object. The object’s keys are the names of the linked modules.
Important: The keys (names of linked modules) must be in the same direction of the link definition.
The value of each module’s property is an object, whose keys are of the format {data_model_snake_name}_id, and values are the IDs of the linked record.
So, in the example above, you link a record of the MyCustom data model in a hello module to a Product record in the Product Module.