Process Builder-중복 관리 버그 작동에 대한 해결 방법을 얻을 수 없습니다.

Aug 19 2020

Process Builder와 중복 관리 사이의 충돌과 관련하여 매우 실망스러운 버그 가 있습니다 .

어떤 사람들은 이에 대한 해결 방법을 제안했지만 작동하도록 할 수 없으며 갈등이 여전히 발생하고 있습니다.

이것이 해결 방법입니다. Yi-Hs Tsai와 Manu Devaraju에게 감사드립니다.

For those looking for a work around to this very annoying problem, here's a solution that I've found works:

Create a checkbox field on the object called "Allow duplicates?" with default set to false.
In your Duplicate rule definition, include this new field under the "Conditions" section.
In your flow or process builder, BEFORE you update the record, first do an update where you set the "Allow duplicates?" field to true.  Then perform the update you want.
Since "Allow duplicates?" is checked and the update no longer meets the rule conditions, so shouldn't trigger the duplicate rule.
If you want the duplicate rule to run in the future for this record, you can do another record update to uncheck the "Allow duplicates?" field.

For instance, I have a duplicate rule on Contacts that has a whole bunch of matching criteria.  Following the steps I:

Create a field on the Contact object called "Allow Duplicates?" with default unchecked.
In my duplicate rule (Setup -> quickfind -> Duplicate Rules), I set a condition: "Contact: Allow Duplicates? EQUALS False"
In my flow, I have a step where I set Allow Duplicates? = true and update my record.
In my flow, then I perform the update on the email, phone, etc., that ordinarily would trigger the rule because of the my matching criteria.
In my flow, when I'm all done, I set the Allow Duplicates? back to false.

다른 누군가 (Daniel DeAguilar)가 이것에 대해 좀 더 가지고있었습니다.

So what i did was created the allow duplicates checkbox Yi-Hs mentions on my Account object (default unchecked), and in process builder did the following steps:

Under 'Choose Object and Specify When to Start the Process' i had recursion enabled (this was key)
1st node in process was looking for whenever my parent account field was changed
Immediate action in 1st node was changing duplicate checkbox to 'checked/true'
instead of stop i had 'evaluate next criteria' and go to 2nd node'
2nd node looked for when duplicate checkbox = true/checked
immediate action #1 to set parent account lookup to parent account id field (enabling lookup related lists)
immediate action #2 to set duplicate checkbox = false/unchecked

디버그 로그에서 프로세스가 실행중인 것을 볼 수 있으며 그 후에 중복 감지가 실행되고 모든 것이 정상이면 새 사용자 정의 필드에 적절한 값이 있고 감지가 방지됩니다.

그러나 그 후에 더 많은 처리가 진행되고 중복 감지가 다시 실행되고 이번에는 새 사용자 정의 필드에 기본값이 있으므로 감지를 방지하지 않고 프로세스가 처리 할 수없는 DUPLICATES_DETECTED 오류가 발생합니다.

나를 위해 가장 신비로운 것은 '중복 허용'필드를 업데이트해야하는 위치 / 방법입니다. 프로세스 빌더에는 명시적인 업데이트 명령 / 옵션이 없습니다.

다음은 내 프로세스 빌더 구성의 스크린 샷입니다.

답변

2 KrisGoncalves Aug 19 2020 at 20:58

Manu Devaraju의 원래 주석 / 해결 방법을 보려면 해당 아이디어에 대한 주석을 더 자세히 살펴보면이 문제가 훨씬 더 잘 설명됩니다. 아래는 복사 / 붙여 넣기 단계입니다.

  1. 연락처 개체에 새 선택 목록 필드 '중복 무시'(예 / 아니요)를 만듭니다.

  2. 이름, 성 및 전화 번호 조합에 대한 일치 규칙 만들기

  3. 위의 단계 a에서 만든 일치 규칙을 사용하여 중복 규칙을 만듭니다. 중복 규칙에서 아래 섹션을 찾고 기준에 'Override Duplicate'필드와 값을 'No'로 추가합니다. b. 위의 조건은 '중복 재정의'필드 값이 '아니요'인 경우에만 중복 규칙을 실행 함을 의미합니다. 조건 선택적으로 규칙을 실행하기 위해 레코드가 충족해야하는 조건을 지정합니다.

  4. 프로세스 빌더 / 흐름에서 새 레코드를 만들거나 기존 레코드 세트를 업데이트하려고 할 때이 추가 필드 'Override Duplicate'를 'Yes'로 설정합니다. 즉, 흐름에서 명시 적으로 중복 규칙을 전달하려고합니다. 그 흐름은 오류 메시지를 던지지 않습니다.

  5. 워크 플로 규칙 및 필드 업데이트를 사용하여 프로세스 빌더가 '예'로 업데이트 한 직후 '무시 플래그'를 '아니요'로 설정 해제합니다. 워크 플로 규칙 이름 : WF 설정되지 않음 중복 플래그 조건 재정의 : 중복 무시 = 예 작업 : 워크 플로 필드 업데이트 워크 플로 호출 필드 업데이트 이름 : WFU 설정되지 않음 업데이트 할 중복 플래그 필드 무시 : 중복 플래그 값 무시 : 아니요

핵심은 WF가 최종 업데이트를 수행하여 플래그를 다시 False로 설정하는 것 같습니다 . 이것은 버그 (PB에만 해당)로 실행되지 않습니다.