Loading
メール配信ドメイン検証状況の確認方法のご案内続きを読む
ヘルプサイトの計画メンテナンスに関するお知らせ続きを読む
ただいま大変多くのお問い合わせをいただいており、ご連絡までにお時間を頂戴しております続きを読む
公共セクタードキュメント
目次
絞り込み条件を選択

          結果がありません
          結果がありません
          検索のヒントをいくつかご紹介します

          キーワードの入力ミスがないか確認する。
          より一般的な検索語を使用する。
          絞り込み条件を減らして、検索範囲を広げる。

          Salesforce ヘルプ全体を検索
          画面再証明アプリケーションへの Apex トリガーの更新

          画面再証明アプリケーションへの Apex トリガーの更新

          カテゴリ Benefit の個々のアプリケーション レコードが作成されたときに実行される Apex トリガーを更新します。再証明アプリケーションが審査を通過して審査中の場合に BMRecertEvent を公開するようにトリガーを設定します。BMRecertEvent のイベントハンドラーは、申請に関連する給付割り当ての再認定状況を更新します。

          必要なエディション

          サポートされている製品のエディションを表示する。
          必要なユーザー権限
          Apex トリガーを更新する 「Apex 開発」
          1. [設定] のオブジェクトマネージャーで、[ Individual Application] を選択します。
          2. Triggers] をクリックします。
          3. ProcessIAForBenefitAssistance で、[アクションメニュー] をクリックし、[編集] を選択します。
          4. テキストボックスに次のコードを貼り付けます。「Omnistudio-Namespace-Prefix」を組織にインストールされている Omnistudio パッケージの名前空間プレフィックスに置き換えます。
            [設定] の [インストール済みパッケージ] ページで OmniStudio パッケージの名前空間プレフィックスを見つけます。
            trigger ProcessIAForBenefitAssistance on IndividualApplication (after update) {
                String procedureNameForNewIA = 'BenefitManagement_ProcessIndividualApplication';
                Map <String, Object> ipInput = new Map <String, Object> ();
                Map <String, Object> ipOutput = new Map <String, Object> ();
                Map <String, Object> ipOptions = new Map <String, Object> ();
                
                // List to hold the Platform Events to be published
                List<BMRecertEvent__e> eventsToPublish = new List<BMRecertEvent__e>();
                
                // Iterate through the inserted or updated records
                for (IndividualApplication ia : Trigger.new) {
                    if(ia.Status == 'Submitted' && ia.Category == 'Benefit') {
                        String recordId = ia.Id;
                        ipInput.put('RecordId', recordId);
                    
                        /* Call the IP via runIntegrationService, and save the output to ipOutput */
                        ipOutput = (Map <String, Object>) Omnistudio-Namespace-Prefix.IntegrationProcedureService.runIntegrationService(procedureNameForNewIA, ipInput, ipOptions);
                        System.debug('IP Output: ' + ipOutput);
                        IndividualApplication iaRecord = [SELECT Id, Status, ApplicationType, Category FROM IndividualApplication WHERE Id = :ia.Id];
                        if(iaRecord.Status != 'Denied' && iaRecord.ApplicationType == 'Recertification'){
                            BMRecertEvent__e event = new BMRecertEvent__e();
                            
                            // Set fields on the Platform Event based on the inserted or updated record
                            event.RecordId__c = iaRecord.Id;
                            
                            // Add the Platform Event to the list of events to be published
                            eventsToPublish.add(event);
                        }
                    }             
                }
                
                // Publish the list of Platform Events
                if (!eventsToPublish.isEmpty()) {
                    EventBus.publish(eventsToPublish);
                }
            }
          5. 変更を保存します。
           
          読み込み中
          Salesforce Help | Article