> For the complete documentation index, see [llms.txt](https://docs.inogic.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.inogic.com/deduped/features/duplicate-prevention/prevent-server-side-duplicate-records/prevent-server-side-duplicate-records-using-assembly-code.md).

# Prevent Server Side Duplicate Records using Assembly Code

The app enables users to prevent duplicates when creating new records and updating existing records on the server side programmatically using the Assembly, WPF Application, and Data Import processes.

Here’s how you can prevent duplicates using assembly code with DeDupeD:

To prevent duplicates on the server side, first configure the[ server-side settings](https://docs.inogic.com/deduped/configuration/entity-configuration), and then you’ve to pass “SuppressDuplicateDetection” inside your code as false while creating or updating the record. Passing a false parameter will prevent the creation of duplicate records.

If you still want to allow duplicates, then again configure the server-side settings, or else pass “SuppressDuplicateDetection” inside the code as true while creating or updating the record.

To summarize the "SuppressDuplicateDetection" parameter, you will have to pass the below values as per the requirement:

* **True –** To create or update the record if a duplicate is found.
* **False –** To not create or update the record if a duplicate is found.

```
Entity target = new Entity(“account”);
target[“name”] = “Ryan”;
CreateRequest req = new CreateRequest();
req.Target = target;
req["SuppressDuplicateDetection"] = false;
CreateResponse response = (CreateResponse)service.Execute(req);
```

```
Entity target = new Entity(“account”,new Guid(“15861e65-5f58-ee11-a332-00155d06340c”));
target[“name”] = “Ryan”;
UpdateRequest req = new UpdateRequest  ();
req.Target = target;
req[“SuppressDuplicateDetection”] = false;
UpdateResponse response = (UpdateResponse)service.Execute(req);
```

{% hint style="info" %}
**Note: During creating or updating records, you will have to use Service.Execute request, you won’t be able to use SuppressDuplicateDetection with Service.Create or Service.Update.**
{% endhint %}

{% hint style="success" %}
For further queries, reach out to us at <crm@inogic.com>
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.inogic.com/deduped/features/duplicate-prevention/prevent-server-side-duplicate-records/prevent-server-side-duplicate-records-using-assembly-code.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
