{"title":"RecordRef.Reset() Method","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/recordref/recordref-reset-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-reset-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-reset-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":"Removes all filters, including any special filters set by the MarkedOnly method (Record), changes fields select for loading back to all, sets the read isolation level to the default value, and changes the current key to the primary key.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":2,"title":"Syntax","slug":"syntax","at":395,"chars":39},{"level":2,"title":"Parameters","slug":"parameters","at":434,"chars":100},{"level":2,"title":"Remarks","slug":"remarks","at":534,"chars":131},{"level":2,"title":"Example","slug":"example","at":665,"chars":1573},{"level":2,"title":"Related information","slug":"related-information","at":2238,"chars":137}],"text":"> Version: _Available or changed with runtime version 1.0._\nRemoves all filters, including any special filters set by the MarkedOnly method (Record), changes fields select for loading back to all, sets the read isolation level to the default value, and changes the current key to the primary key. Also removes any marks on the record and clears any AL variables defined on its table definition.\n## Syntax\n```al\n RecordRef.Reset()\n```\n## Parameters\nRecordRef\nType: recordref-data-type\nAn instance of the recordref-data-type data type.\n## Remarks\nIf no table is selected, this method returns an error.\nThis method works the same as the ../record/record-reset-method.\n## Example\nThe following example opens the Customer \\(18\\) table and creates a RecordRef variable that is named RecRef. The recordref-getfilters-method gets filters that have been applied to records in the table. The filters that are returned, if any, are stored in the Filters1 variable and displayed in message box. In this example, no filters are set so the message is blank. The recordref-setrecfilter-method sets a filter on the current key of the current record that is represented by the RecRef variable. The recordref-getfilters-method gets the filters that have been set and stores the value in the Filters2 variable. The message displays No. because the No. field is set as a filter. The Reset method removes the filter that was set. The value of the filter that is returned by the recordref-getfilters-method after the recordref-reset-method is executed is stored in the Filters3 variable. Filter3 is blank because the filter that was set by `RecRef.SetRecFilter;` is removed by the Reset method.\n```al\nvar\n    RecRef: RecordRef;\n    Filters1: Text;\n    Filters2: Text;\n    Filters3: Text;\n    Text000: Label 'Filter before filter is set is: %1.';\n    Text001: Label 'Filter after filter is set is: %1.';\n    Text002: Label 'Filter before filter is reset is: %1.';\nbegin\n    RecRef.Open(Database::Customer);\n    Filters1 := RecRef.GetFilters;\n    Message(Text000, Filters1);\n    RecRef.SetRecFilter;\n    Filters2 := RecRef.GetFilters;\n    Message(Text001, Filters2);\n    RecRef.Reset;\n    Filters3 := RecRef.GetFilters;\n    Message(Text002, Filters3);\nend;\n\n```\n## Related information\nrecordref-data-type\nGet Started with AL<../../devenv-get-started>\nDeveloping Extensions<../../devenv-dev-overview>"}