Loading
공공 부문 솔루션 문서
목차
필터 선택

          결과 없음
          결과 없음
          몇 가지 검색 팁

          키워드의 맞춤법을 확인하십시오.
          더 일반적인 검색 용어를 사용하십시오.
          필터 수를 줄여 검색 범위를 확장하십시오.

          전체 Salesforce 도움말 검색
          화면 재인증 응용 프로그램에 Apex 트리거 업데이트

          화면 재인증 응용 프로그램에 Apex 트리거 업데이트

          혜택 범주의 개별 응용 프로그램 레코드가 생성될 때 실행되는 Apex 트리거를 업데이트합니다. 재인증 신청이 선별을 통과하고 검토 중일 때 BMRecertEvent를 게시하도록 트리거를 구성합니다. BMRecertEvent의 이벤트 처리기는 신청과 관련된 보상 할당의 재인증 상태를 업데이트합니다.

          필수 Edition

          지원되는 제품 버전 보기
          필요한 사용자 권한
          Apex 트리거를 업데이트하려면 다음을 수행합니다. 작성자 Apex
          1. 설정의 개체 관리자에서 개별 응용 프로그램을 선택합니다.
          2. 트리거를 클릭합니다.
          3. ProcessIAForBenefitAssistance에서 을 클릭합니다. 작업 메뉴을 클릭한 다음 Edit(편집)를 선택합니다.
          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