# Record.Insert() Method
> Version: _Available or changed with runtime version 1.0._
Inserts a record into a table without executing the code in the OnInsert trigger.
## Syntax
```al
[Ok := ]  Record.Insert()
```
## Parameters
Record
Type: record-data-type
An instance of the record-data-type data type.
## Return Value
*[Optional] Ok*
Type: ../boolean/boolean-data-type
true 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.
## Remarks
The 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.
## Example 1
This example shows how to use the Insert method without a return value.
```al
Customer.Init;
Customer."No." := '1120';
Customer.Insert();
```
If customer 1120 already exists, then a run-time error occurs.
## Example 2
This example shows how to use the Insert method with a return value.
```al
var
    CustomerRec: Record Customer;
    Text000: Label 'Customer no: %1 inserted.';
    Text001: Label 'Customer no: %1 already exists.';
begin
    CustomerRec.Init();
    CustomerRec."No." := '1120';
    if CustomerRec.Insert() then
      Message(Text000, CustomerRec."No.")
    else
      Message(Text001, CustomerRec."No.");
end;
```
No run-time error occurs if customer 1120 already exists.
## Related information
../../devenv-table-system-fields#systemid
record-data-type
Get Started with AL<../../devenv-get-started>
Developing Extensions<../../devenv-dev-overview>

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. https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/record/record-insert--method/
