{"title":"Record.SetRange(Any [, Any] [, Any]) Method","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/record/record-setrange-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-setrange-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-setrange-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":"Sets a simple filter, such as a single range or a single value, on a field.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":1,"title":"Record.SetRange(Any [, Any] [, Any]) Method","slug":"recordsetrangeany-any-any-method","at":0,"chars":937},{"level":2,"title":"Syntax","slug":"syntax","at":182,"chars":85},{"level":2,"title":"Parameters","slug":"parameters","at":267,"chars":536},{"level":2,"title":"Related information","slug":"related-information","at":803,"chars":134}],"text":"# Record.SetRange(Any [, Any] [, Any]) Method\n> Version: _Available or changed with runtime version 1.0._\nSets a simple filter, such as a single range or a single value, on a field.\n## Syntax\n```al\n Record.SetRange(Field: Any [, FromValue: Any] [, ToValue: Any])\n```\n## Parameters\nRecord\nType: record-data-type\nAn instance of the record-data-type data type.\nField\nType: ../any/any-data-type\nThe field that you want to filter.\n*[Optional] FromValue*\nType: ../any/any-data-type\nThe lower limit of the range. The data type of this parameter must match the data type of Field.\n*[Optional] ToValue*\nType: ../any/any-data-type\nThe upper limit of the range. If you omit this parameter, then the value that you specified for FromValue is used. The data type of this parameter must match the data type of Field.\n## Related information\nrecord-data-type\nGet Started with AL<../../devenv-get-started>\nDeveloping Extensions<../../devenv-dev-overview>"}