> For the complete documentation index, see [llms.txt](https://docs.flosum.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flosum.com/data-migrator/data-migrator-es/plantillas/disenador-de-plantillas/conservar-las-relaciones-entre-objetos.md).

# Conservar las relaciones entre objetos

## ![](https://626430605-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvaxzColPOlNbsq4imqpd%2Fuploads%2FcfMTqg4Brbm9baWutclZ%2FSummary2-Small-Icon.svg?alt=media\&token=d1cf162d-c02d-4184-988e-7f7350e450fc) Resumen

Este artículo explica cómo preservar las relaciones entre objetos durante una migración. Para conservar el vínculo entre registros padre e hijo durante la migración, los registros hijo migrados deben incluir el **Campo de relación** que los conecta con su padre. Esto se aplica tanto a relaciones Maestro-Detalle como a relaciones de Búsqueda.

Para obtener más información sobre las conexiones de objetos, consulte la sección sobre conexiones de objetos en el siguiente artículo.

* [Resumen de plantillas](/data-migrator/data-migrator-es/plantillas/disenador-de-plantillas/resumen-de-plantillas.md#object-connections)

## Ejemplo de relación

En este ejemplo, demostramos cómo mantener la relación entre objetos padre e hijo. Esto supone familiaridad con la creación de plantillas y la adición de objetos y campos. Si necesita un repaso, consulte los siguientes artículos.

* [Crear una plantilla](/data-migrator/data-migrator-es/plantillas/disenador-de-plantillas/crear-una-plantilla.md)
* [Agregar objetos a una plantilla](/data-migrator/data-migrator-es/plantillas/disenador-de-plantillas/agregar-objetos-a-una-plantilla.md)
* [Agregar campos a los objetos](/data-migrator/data-migrator-es/plantillas/disenador-de-plantillas/agregar-campos-a-los-objetos.md)

{% stepper %}
{% step %}

### Objetos padre e hijo

La captura de pantalla a continuación muestra una plantilla con el **Cuenta** objeto como padre del **Contacto** y **Caso** objetos. No se han agregado campos adicionales.

* **Contacto**: Este objeto tiene una relación Maestro-Detalle con **Cuenta**.
* **Caso**: Este objeto tiene una relación de Búsqueda con **Cuenta**.

<div align="left"><figure><img src="https://626430605-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvaxzColPOlNbsq4imqpd%2Fuploads%2FEdVQ5fjrR1XWOl7KXwsG%2FPerservingObjectRelationships-S01-01.png?alt=media&amp;token=7d7dcf23-9d4b-4ec2-aebe-a5186ccfc460" alt="" width="563"><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}

### Campo de relación

En la captura de pantalla a continuación, ambos hijos del **Cuenta** objeto tienen el **AccountId** campo listado en la parte inferior. Este campo, llamado el **Campo de relación**, los conecta con el **Cuenta** objeto. Debe agregar este campo a cada objeto hijo para preservar la relación durante la migración.

<div align="left"><figure><img src="https://626430605-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvaxzColPOlNbsq4imqpd%2Fuploads%2F9nIJvyNLFVvbkSgDkJxT%2FPerservingObjectRelationships-S02-01.png?alt=media&amp;token=c0bd690e-d0fb-4c66-a5bb-35002c9ec079" alt="" width="563"><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}

### Agregar campo de relación

Las instrucciones a continuación le mostrarán cómo agregar el Campo de Relación a cada objeto hijo.

{% hint style="info" %}
Para obtener instrucciones más detalladas sobre cómo agregar un campo a un objeto, consulte el siguiente artículo.

* [Agregar campos a los objetos](/data-migrator/data-migrator-es/plantillas/disenador-de-plantillas/agregar-campos-a-los-objetos.md)
  {% endhint %}

1. Haga clic en el **Contacto** objeto.

   <div align="left"><figure><img src="https://626430605-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvaxzColPOlNbsq4imqpd%2Fuploads%2FnvL6zkK1leQoleiUvNU5%2FPerservingObjectRelationships-S03-01.png?alt=media&amp;token=73fc64c3-3160-48ea-ade8-ecc1987f986d" alt="" width="563"><figcaption></figcaption></figure></div>
2. Marque el **ID de cuenta \[AccountId]** casilla de verificación.

   <div align="left"><figure><img src="https://626430605-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvaxzColPOlNbsq4imqpd%2Fuploads%2FJ5rZG3GlU5ua3CtaJibM%2FPerservingObjectRelationships-S03-02.png?alt=media&amp;token=bfa6cef0-1140-4a71-a7dc-93b35b0f597a" alt="" width="563"><figcaption></figcaption></figure></div>
3. Haga clic **Guardar**.

   <div align="left"><figure><img src="https://626430605-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvaxzColPOlNbsq4imqpd%2Fuploads%2FzcVVWkVQ3u6HtzMYJ3cj%2FPerservingObjectRelationships-S03-03.png?alt=media&amp;token=492a7d7d-a173-483d-b6f4-b3b79161840b" alt="" width="563"><figcaption></figcaption></figure></div>
4. Haga clic en el **Caso** objeto.

   <div align="left"><figure><img src="https://626430605-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvaxzColPOlNbsq4imqpd%2Fuploads%2Fp11zaKHUq8yvs5bSvrp1%2FPerservingObjectRelationships-S03-04.png?alt=media&amp;token=2b583766-a242-4424-b79f-cbc604de644b" alt="" width="563"><figcaption></figcaption></figure></div>
5. Marque el **ID de cuenta \[AccountId]** casilla de verificación.

   <div align="left"><figure><img src="https://626430605-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvaxzColPOlNbsq4imqpd%2Fuploads%2F8jEkYKZzs6GOgmLUHjxW%2FPerservingObjectRelationships-S03-05.png?alt=media&amp;token=d8f8840c-89d6-4314-ac68-82fc3d954021" alt="" width="563"><figcaption></figcaption></figure></div>
6. Haga clic **Guardar**.

   <div align="left"><figure><img src="https://626430605-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvaxzColPOlNbsq4imqpd%2Fuploads%2FZvbS74ccRgDLPKr6QZJL%2FPerservingObjectRelationships-S03-06.png?alt=media&amp;token=8120edbc-8844-47fe-bc58-b6ad1b57188b" alt="" width="563"><figcaption></figcaption></figure></div>
7. Haga clic **Guardar plantilla** para guardar sus cambios.

   <div align="left"><figure><img src="https://626430605-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvaxzColPOlNbsq4imqpd%2Fuploads%2FMSU9q2zZe73gb7CWkf4f%2FPerservingObjectRelationships-S03-07.png?alt=media&amp;token=4ceb1163-ea42-484b-bf44-3363dd7888a4" alt="" width="563"><figcaption></figcaption></figure></div>

{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.flosum.com/data-migrator/data-migrator-es/plantillas/disenador-de-plantillas/conservar-las-relaciones-entre-objetos.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
