Salesforce の Apex トリガーには、挿入、更新、削除、復元などの DML 操作により起動する自動化されたビジネスロジックが含まれています。本番組織にデプロイされたトリガーは、Salesforce の設定ページから直接編集したり、有効化/無効化できません。メタデータツールを使用してデプロイする必要があります。
大規模なデータ移行や緊急修正などの特定の状況では、本番組織で Apex トリガーを一時的または永続的に無効にする必要がある場合があります。この記事では、本番組織でトリガーを無効にするためのサポートされている方法について説明します。
例: 商談オブジェクトの Apex トリガーが、大規模なデータ移行中にエラーを引き起こしています。移行を完了させるには、システム管理者がトリガーを一時的に無効にし、移行を実行してから、トリガーを再度有効にする必要があります。
注: 業務時間中に本番組織でトリガーを無効にする際はその影響を考慮してください。業務時間外に実行することを強くお勧めします。また、メンテナンス期間中は管理者以外のユーザーがアプリケーションにアクセスできないようにしてください。
Salesforce CLI を使用
変更セットを使用
この情報を動画形式で参照するには、「How to Disable a Trigger in a Production Org via Change Set」を視聴してください。
ワークベンチを使用
Ant 移行ツールを使用 (廃止済み - 非推奨)
・Salesforce CLI によるリリースに関する詳細は以下を参照してください。
- メタデータ API を使用したアプリケーションの構築とリリース
・変更セットによるリリースに関する詳細は、「Sandbox から本番環境への変更セットのリリース」の記事を参照してください。
000385540

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.
注:Salesforce Ant 移行ツールは Spring '24 にサポート終了しました。
重要: Ant 移行ツールは Spring '24 にサポートが終了し、新機能の追加や更新は行われなくなりました。上記手順は従来の API バージョンで引き続き機能する可能性がありますが、メタデータデプロイに Salesforce CLI を使用することをお勧めします。詳細は 「Salesforce Ant 移行ツールの有効期限」を参照してください。