{"title":"RecordRef.Modify([Boolean]) Method","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/recordref/recordref-modify-method/","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/methods-auto/recordref/recordref-modify-method, 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/methods-auto/recordref/recordref-modify-method","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":"Modifies a record in a table.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":1,"title":"RecordRef.Modify([Boolean]) Method","slug":"recordrefmodifyboolean-method","at":0,"chars":2447},{"level":2,"title":"Syntax","slug":"syntax","at":127,"chars":70},{"level":2,"title":"Parameters","slug":"parameters","at":197,"chars":368},{"level":2,"title":"Return Value","slug":"return-value","at":565,"chars":238},{"level":2,"title":"Remarks","slug":"remarks","at":803,"chars":1507},{"level":2,"title":"Related information","slug":"related-information","at":2310,"chars":137}],"text":"# RecordRef.Modify([Boolean]) Method\n> Version: _Available or changed with runtime version 1.0._\nModifies a record in a table.\n## Syntax\n```al\n[Ok := ]  RecordRef.Modify([RunTrigger: Boolean])\n```\n## Parameters\nRecordRef\nType: recordref-data-type\nAn instance of the recordref-data-type data type.\n*[Optional] RunTrigger*\nType: ../boolean/boolean-data-type\nSpecifies whether to run the AL code in the OnModify Trigger. If this parameter is true, then the code in the OnModify trigger is executed. If this parameter is false (default), then the code is not executed.\n## Return Value\n*[Optional] Ok*\nType: ../boolean/boolean-data-type\ntrue if the operation was successful; otherwise false. If you omit this optional return value and the operation does not execute successfully, a runtime error will occur.\n## Remarks\nSelect the record that you want to modify by using the primary key fields. The record's current key and filters do not affect the operation.\nIf an end-user modifies a record between the time that another end-user or another process reads the record and modifies it, then the second user must refresh the value of the record variable before editing the record. Otherwise, the end-user receives the following run-time error:\nAnother user has modified the record for this \\<Table Name> after you retrieved it from the database.\nEnter your changes again in the updated window, or start the interrupted activity again.\nIn earlier versions of Dynamics 365, certain situations allowed code that an end-user runs to modify a record after a newer version of the record was written and committed to the database. This would overwrite the newer changes. However, in Dynamics 365 Business Central, we have restricted the Modify Method \\(RecordRef\\), recordref-rename-method, and recordref-delete-method so that the end-user receives the following run-time error in these certain situations:\nUnable to change an earlier version of the \\<Table Name> record. The record should be read from the database again. This is a programming error.\nYou must design your application so that you use the most up-to-date version of the record for modifications to the database. You use the recordref-get-method to refresh the record with the latest version.\nThis method works the same as the ../record/record-modify-method.\n## Related information\nrecordref-data-type\nGet Started with AL<../../devenv-get-started>\nDeveloping Extensions<../../devenv-dev-overview>"}