{"title":"Record.Init() Method","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/record/record-init-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-init-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-init-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":"Initializes a record in a table.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":2,"title":"Syntax","slug":"syntax","at":93,"chars":35},{"level":2,"title":"Parameters","slug":"parameters","at":128,"chars":91},{"level":2,"title":"Remarks","slug":"remarks","at":219,"chars":1760},{"level":2,"title":"Related information","slug":"related-information","at":1979,"chars":134}],"text":"> Version: _Available or changed with runtime version 1.0._\nInitializes a record in a table.\n## Syntax\n```al\n Record.Init()\n```\n## Parameters\nRecord\nType: record-data-type\nAn instance of the record-data-type data type.\n## Remarks\nThis method assigns default values to each field in the record, including the SystemId field when a table is created. For any new field added later into the record, values are initialized by default or by using InitValue Property (Record)<../../properties/devenv-initvalue-property>. If no value was assigned when the table was created, the values are assigned based on the data type, as shown in the following table.\nData type|Default value\nBigInteger|0\nBigText|\\<Empty>\nBLOB|\\<Empty>\nBoolean|No\nCode|'' \\(empty string\\)\nDate|0d \\(Undefined date\\)\nDateFormula|'' \\(empty string\\)\nDateTime|0DT \\(Undefined datetime\\)\nDecimal|0.0\nDuration|0\nGUID|00000000-0000-0000-0000-000000000000\nInteger|0\nOption|0\nRecordID|\\<Empty>\nTableFilter|\\<Empty>\nText|'' \\(empty string\\)\nTime|0T \\(Undefined time\\)\n> NOTE\n> Primary key and timestamp fields aren't initialized.\nAfter the method runs, you can change the values in any or all of the fields before you call the ../recordref/recordref-insert--method to enter the record in the table. Be sure that the fields that make up the primary key contain values that make the total primary key unique. If the primary key isn't unique (such as the record already exists), then the record is rejected.\nThe method works in the same way as the ../recordref/recordref-init-method.\n> NOTE\n> You aren't required to call the `Init()` method every time you intend to insert a record as, the fields are already populated, either with default values or the values set by the InitValue property. For the use cases, where the values need to be refreshed with each iteration in a loop or if they're inserted through a parameter, you should use the `Init()` method to make sure that the record aligns with the other data in the table.\n## Related information\nrecord-data-type\nGet Started with AL<../../devenv-get-started>\nDeveloping Extensions<../../devenv-dev-overview>"}