# GetRecIdFromKey
Converts a key to a record ID. The key is always part of the page result.
## Method Signature
`string GetRecIdFromKey(string key)`
## Parameters
Parameter|Description
key|Type: String<br /><br /> The bookmark of the record that includes both primary key and concurrency information.
## Results
Result name|Description
String|Type: String<br /><br /> The record ID that was obtained from the key.
## Faults
SOAP fault message|Description
\[*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.
## Usage Example
```c#

Customer_Service service = new Customer_Service();
Customer cust = new Customer();
service.UseDefaultCredentials = true;
string id = service.GetRecIdFromKey(cust.No);
cust = service.ReadByRecId(id.ToUpper());
```
## Related information
basic-page-operations

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. https://jonas-paprotka.de/docs/dev-itpro/webservices/getrecidfromkey-operation/
