{"title":"Record.Insert() Method","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/record/record-insert--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/record/record-insert--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/record/record-insert--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":"Inserts a record into a table without executing the code in the OnInsert trigger.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":2,"title":"Syntax","slug":"syntax","at":142,"chars":46},{"level":2,"title":"Parameters","slug":"parameters","at":188,"chars":91},{"level":2,"title":"Return Value","slug":"return-value","at":279,"chars":238},{"level":2,"title":"Remarks","slug":"remarks","at":517,"chars":216},{"level":2,"title":"Example 1","slug":"example-1","at":733,"chars":218},{"level":2,"title":"Example 2","slug":"example-2","at":951,"chars":485},{"level":2,"title":"Related information","slug":"related-information","at":1436,"chars":176}],"text":"> Version: _Available or changed with runtime version 1.0._\nInserts a record into a table without executing the code in the OnInsert trigger.\n## Syntax\n```al\n[Ok := ]  Record.Insert()\n```\n## Parameters\nRecord\nType: record-data-type\nAn instance of the record-data-type data type.\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\nThe inserted record will automatically get assigned a SystemId by the platform. To assign a specific SystemId instead of the one assigned by the platform, use record-insert-boolean-boolean-method instead.\n## Example 1\nThis example shows how to use the Insert method without a return value.\n```al\nCustomer.Init;\nCustomer.\"No.\" := '1120';\nCustomer.Insert();\n```\nIf customer 1120 already exists, then a run-time error occurs.\n## Example 2\nThis example shows how to use the Insert method with a return value.\n```al\nvar\n    CustomerRec: Record Customer;\n    Text000: Label 'Customer no: %1 inserted.';\n    Text001: Label 'Customer no: %1 already exists.';\nbegin\n    CustomerRec.Init();\n    CustomerRec.\"No.\" := '1120';\n    if CustomerRec.Insert() then\n      Message(Text000, CustomerRec.\"No.\")\n    else\n      Message(Text001, CustomerRec.\"No.\");\nend;\n```\nNo run-time error occurs if customer 1120 already exists.\n## Related information\n../../devenv-table-system-fields#systemid\nrecord-data-type\nGet Started with AL<../../devenv-get-started>\nDeveloping Extensions<../../devenv-dev-overview>"}