# AutoReplace Property
> Version: _Available or changed with runtime version 1.0._
Sets whether imported records automatically replace existing records with the same primary key.
## Applies to
 Xml Port Table Element
## Property Value
True if the records are replaced; otherwise, false. The default value is false.
## Syntax
```al
AutoReplace = true;
```
## Remarks
If a record with the same primary key is found in the database, then the record is initialized with the initial value for each field and then populated with the values in the imported record. Any field in the record that is not present in the imported record retains its initial value. For more information about initial values, see devenv-initvalue-property.
> WARNING
> If this property is set to true, then the devenv-autoupdate-property has no effect.
## Related information
devenv-autoupdate-property
devenv-autosave-property

Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/properties/devenv-autoreplace-property, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact. https://jonas-paprotka.de/docs/dev-itpro/developer/properties/devenv-autoreplace-property/
