In Service Studio you can use entities that are exposed by another eSpace or Extension, called, in this context, a Producer. Simply add these entities as eSpace references for your eSpace, called, in this context, a Consumer eSpace.
How to Add an Entity Reference:
In this window, you can add two special types of entities, by selecting:
How entity references are handled
Once an entity is added as a reference in the Consumer eSpace, you can use it like any other entity originally created in your eSpace with the difference that you cannot change its definition.
The entities added as references in the Consumer eSpace remain in their Producer repository. If the producer is an eSpace, the entities remain stored in this eSpace repository. If the producer is an extension, the entities remain stored in the repository specified in this extension, which could be a different table in the OutSystems Platform Database or in a different database.
To manage the entity records you have the following entity actions:
These entity actions are executed in the context of the Consumer eSpace. See how action references are executed.
If the entity has no primary key, only the Create action is available.
Single and Multi-tenant entities
If the entity is single-tenant, then all the data managed by the Producer and the Consumers is stored in the Producer repository and shared and visible to any eSpace.
If the entity is multi-tenant, Service Studio guarantees data isolation between the Producer eSpace and its Consumers. The entity is stored in the Producer repository but each Consumer has its own tenant identifier. Therefore you can have the data segmented by tenant. See how to manage multi-tenant entities.
Add / Remove eSpace References | Expose an Entity | Use a System Entity | Use a Foreign Entity