{"title":"AutoSave Property","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/properties/devenv-autosave-property/","by":"JOP-AL","license":"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-autosave-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.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/properties/devenv-autosave-property","source":{"name":"Business Central developer and IT pro docs","repo":"https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb","commit":"828b6ee72fcd75755627cd6011f3d20899217ab2","date":"2026-11-19"},"checked":"2026-11-19","description":"Sets whether imported records are automatically written to the table.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":2,"title":"Applies to","slug":"applies-to","at":130,"chars":38},{"level":2,"title":"Property Value","slug":"property-value","at":168,"chars":121},{"level":2,"title":"Syntax","slug":"syntax","at":289,"chars":38},{"level":2,"title":"Remarks","slug":"remarks","at":327,"chars":1286},{"level":2,"title":"Related information","slug":"related-information","at":1613,"chars":77}],"text":"> Version: _Available or changed with runtime version 1.0._\nSets whether imported records are automatically written to the table.\n## Applies to\n Xml Port Table Element\n## Property Value\nTrue if the record is written to the table automatically; otherwise, false. The default value is true.\n## Syntax\n```al\nAutoSave = false;\n```\n## Remarks\nThis property applies to new records that are inserted into the table and existing records that are modified.\nIf AutoSave is set to false, then an imported record is not automatically written to the appropriate table. To insert or modify records manually, add code to the ../triggers-auto/xmlporttableelement/devenv-onbeforeinsertrecord-xmlporttableelement-trigger and the ../triggers-auto/xmlporttableelement/devenv-onbeforemodifyrecord-xmlporttableelement-trigger. For example, set the AutoSave property to false, create a new method that evaluates the records, does some calculations, or retrieves additional data, and then call your new method from the OnBeforeInsertRecord and OnBeforeModifyRecord triggers. Use the OnAfterInitRecord trigger if you must evaluate the records before inserting or modifying them, or if you want to calculate or retrieve additional data before inserting or modifying the record.\nIf a record already exists and AutoSave is set to true, then the values of the devenv-autoreplace-property and the devenv-autoupdate-property determine whether the imported record overwrites or updates the existing record. If the record already exists and the values of the AutoReplace property and the AutoUpdate property are both false, then an error occurs.\n## Related information\ndevenv-autoreplace-property\ndevenv-autoupdate-property"}