> 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-ja/tenpurto/tenpurtodezain/obujekutonowosuru.md).

# オブジェクトの関連を維持する

## ![](https://1278659608-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) 概要

この記事では、移行中にオブジェクトの関係を保持する方法を説明します。移行中に親レコードと子レコードのリンクを保持するには、移行された子レコードにそれらを親に接続する **関係フィールド** が含まれている必要があります。これはマスタ詳細およびルックアップの両方の関係に適用されます。

オブジェクトの接続について詳しくは、次の記事の「オブジェクトの接続」セクションを参照してください。

* [テンプレートの概要](/data-migrator/data-migrator-ja/tenpurto/tenpurtodezain/tenpurtono.md#object-connections)

## 関係の例

この例では、親オブジェクトと子オブジェクトの関係を維持する方法を示します。これはテンプレートの作成やオブジェクトとフィールドの追加に慣れていることを前提としています。復習が必要な場合は、次の記事を参照してください。

* [テンプレートの作成](/data-migrator/data-migrator-ja/tenpurto/tenpurtodezain/tenpurtono-1.md)
* [テンプレートにオブジェクトを追加する](/data-migrator/data-migrator-ja/tenpurto/tenpurtodezain/tenpurtoniobujekutowosuru.md)
* [オブジェクトにフィールドを追加する](/data-migrator/data-migrator-ja/tenpurto/tenpurtodezain/obujekutonifrudowosuru.md)

{% stepper %}
{% step %}

### 親オブジェクトと子オブジェクト

下のスクリーンショットは、テンプレートで **Account** オブジェクトが **取引先担当者** および **ケース** オブジェクトの親として表示されているものです。追加のフィールドは追加されていません。

* **取引先担当者**: このオブジェクトは **Account**.
* **ケース**とのルックアップ関係を持っています。 **Account**.

<div align="left"><figure><img src="https://1278659608-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 %}

### 関係フィールド

下のスクリーンショットでは、両方の **Account** オブジェクトの子に **AccountId** フィールドが下部にリストされています。このフィールドは、 **関係フィールド**と呼ばれ、彼らを **Account** オブジェクトに接続します。移行中に関係を保持するには、このフィールドを各子オブジェクトに追加する必要があります。

<div align="left"><figure><img src="https://1278659608-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 %}

### 関係フィールドを追加

以下の手順では、各子オブジェクトに関係フィールドを追加する方法を示します。

{% hint style="info" %}
オブジェクトにフィールドを追加する方法の詳細については、次の記事を参照してください。

* [オブジェクトにフィールドを追加する](/data-migrator/data-migrator-ja/tenpurto/tenpurtodezain/obujekutonifrudowosuru.md)
  {% endhint %}

1. クリック **取引先担当者** オブジェクト。

   <div align="left"><figure><img src="https://1278659608-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. をチェックします。 **取引先ID \[AccountId]** チェックボックス。

   <div align="left"><figure><img src="https://1278659608-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. をクリックします **保存**.

   <div align="left"><figure><img src="https://1278659608-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. クリック **ケース** オブジェクト。

   <div align="left"><figure><img src="https://1278659608-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. をチェックします。 **取引先ID \[AccountId]** チェックボックス。

   <div align="left"><figure><img src="https://1278659608-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. をクリックします **保存**.

   <div align="left"><figure><img src="https://1278659608-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. をクリックします **テンプレートを保存** 変更を保存するには。

   <div align="left"><figure><img src="https://1278659608-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-ja/tenpurto/tenpurtodezain/obujekutonowosuru.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.
