Question: I am running into an issue with the ability to [Suppress Duplicate Detection](https://learn.microsoft.com/en-us/powerapps/developer/data-platform/webapi/manage-duplicate-detection-create-update) in the Dynamics CRM API. I am qualifying leads and the Duplicate Detection is getting triggered on some of the leads. I have some logic to decide if we want to suppress the so on certain leads I want to bypass that detection.

What is happening is it is not working when in the request headers I set the `MSCRM.SuppressDuplicateDetection: true` and it will still not qualify the lead.

Here is my full code:

```
    api_surpress_dup_detection_headers = {
    "Authorization": BEARER,
    "If-None-Match": None,
    "OData-Version": "4.0",
    "OData-MaxVersion": "4.0",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "MSCRM.SuppressDuplicateDetection": "true",
    "If-Match": "*"
}

lead_qualify_url = f"{data_url}leads({lead_guid})/Microsoft.Dynamics.CRM.QualifyLead"
data = {
    'CreateAccount': False,
    'CreateContact': True,
    'CreateOpportunity':False,
    'Status':3
}
qualify_lead_response = requests.post(lead_qualify_url, headers=api_surpress_dup_detection_headers, data=json.dumps(data))

```

The result I get is:

> 
> <Response [412]> '{"error":{"code":"0x80040333","message":"A record
> was not created or updated because a duplicate of the current record
> already exists."}}'
> 
> 
> 

If anyone has solved this before I would greatly appreciate any help!

Answer: 
The comments here have done a great job explaining why this doesn't work. Here's an elaboration a bit more on why the multiplication technique does work, and why the division technique doesn't.

Let's begin with multiplication. Suppose you want to compute 200 × 10. You could compute that by evaluating 200 × (9 + 1), or 200 × (8 + 2), etc. Each of those expressions is equivalent to the original one. Using the distributive property, this means we could compute 200 × 9 + 200 × 1 to get 200 × 10, or we could compute 200 × 8 + 200 × 2 to get 200 × 10, etc.

It just so happens that multiplying by powers of two happens to be done more easily by doing bitshifts. So, for example, we could compute 200 × 10 by evaluating

```
200 x 10 = 200 x (8 + 2)
         = 200 x 8  +  200 x 2
         = (200 << 3) + (200 << 1)

```

Now, can we do this for division? Well, it is indeed true that 200 / 10 = 200 / (8 + 2), same as before. But unlike multiplication, in the case of 200 / (8 + 2), we don't have a distributive property, so we cannot rewrite

> 
> 200 / (8 + 2) = (200 / 8) + (200 / 2).
> 
> 
> 

Therefore, we can't use the reverse of the bitshifting technique to quickly do the division.
You've gotten good answers, but allow me to offer another view of this that might be simpler. This was the multiplication:

```
a = 20<<3 
b = 20<<1 
a + b 

```

And you wanted to do division like this:

```
a = 20>>3 
b = 20>>1 
a + b 

```

The problem here is that you only have reversed the individual parts. You need to reverse the whole process. Let's take a simple example from temperatures. If you have a certain temperature `c` in Celsius and want to convert it to Fahrenheit, you do it with this formula:

```
f = 1.8c + 32

```

What you're trying is to convert back to Celsius with the same formula:

```
c = f/1.8 - 32

```

But since the addition was the last step in the original formula, we need to reverse that step **before** we reverse the multiplication. Here is the correct inversion:

```
c = (f-32)/1.8

```