{"title":"Record.GetBySystemId(Guid) Method","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/record/record-getbysystemid-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-getbysystemid-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-getbysystemid-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":"Gets a record by its SystemId.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":1,"title":"Record.GetBySystemId(Guid) Method","slug":"recordgetbysystemidguid-method","at":0,"chars":1201},{"level":2,"title":"Syntax","slug":"syntax","at":127,"chars":77},{"level":2,"title":"Parameters","slug":"parameters","at":204,"chars":169},{"level":2,"title":"Return Value","slug":"return-value","at":373,"chars":237},{"level":2,"title":"Remarks","slug":"remarks","at":610,"chars":124},{"level":2,"title":"Example","slug":"example","at":734,"chars":291},{"level":2,"title":"Related information","slug":"related-information","at":1025,"chars":176}],"text":"# Record.GetBySystemId(Guid) Method\n> Version: _Available or changed with runtime version 4.0._\nGets a record by its SystemId.\n## Syntax\n```al\n[RecordExists := ]  Record.GetBySystemId(SystemId: Guid)\n```\n## Parameters\nRecord\nType: record-data-type\nAn instance of the record-data-type data type.\nSystemId\nType: ../guid/guid-data-type\nThe SystemId of the record to retrieve.\n## Return Value\n*[Optional] RecordExists*\nType: ../boolean/boolean-data-type\ntrue if the record exists; otherwise false. If you omit this optional return value and the operation does not execute successfully, a runtime error will occur.\n## Remarks\nEvery record has a SystemId, which is stored in the SystemId field of the table. The SystemId cannot be changed.\n## Example\nThis example shows how to use the GetBySystemId method to retrieve a record.\n```al\nvar\n    CustomerRec: Record Customer;\n    Text000: Label 'Customer was found.';\nbegin\n    If CustomerRec.GetBySystemId('{5286305A-08A3-E911-8180-001DD8B7338E}') then\n    Message(Text000);\nend;\n```\n## Related information\n../../devenv-table-system-fields#systemid\nrecord-data-type\nGet Started with AL<../../devenv-get-started>\nDeveloping Extensions<../../devenv-dev-overview>"}