{"title":"GetRecIdFromKey","url":"https://jonas-paprotka.de/docs/dev-itpro/webservices/getrecidfromkey-operation/","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/webservices/getrecidfromkey-operation, 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/webservices/getrecidfromkey-operation","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","date":"2021-04-01","meta":{"topic":"article"},"outline":[{"level":2,"title":"Method Signature","slug":"method-signature","at":74,"chars":57},{"level":2,"title":"Parameters","slug":"parameters","at":131,"chars":152},{"level":2,"title":"Results","slug":"results","at":283,"chars":113},{"level":2,"title":"Faults","slug":"faults","at":396,"chars":217},{"level":2,"title":"Usage Example","slug":"usage-example","at":613,"chars":237},{"level":2,"title":"Related information","slug":"related-information","at":850,"chars":44}],"text":"Converts a key to a record ID. The key is always part of the page result.\n## Method Signature\n`string GetRecIdFromKey(string key)`\n## Parameters\nParameter|Description\nkey|Type: String<br /><br /> The bookmark of the record that includes both primary key and concurrency information.\n## Results\nResult name|Description\nString|Type: String<br /><br /> The record ID that was obtained from the key.\n## Faults\nSOAP fault message|Description\n\\[*record name*\\] \\[*field*\\] \\[*value*\\] does not exist.|Indicates that the record has been deleted by another user or process after it has been retrieved for this operation.\n## Usage Example\n```c#\n\nCustomer_Service service = new Customer_Service();\nCustomer cust = new Customer();\nservice.UseDefaultCredentials = true;\nstring id = service.GetRecIdFromKey(cust.No);\ncust = service.ReadByRecId(id.ToUpper());\n```\n## Related information\nbasic-page-operations"}