Get the unique id of a record in an external system, that is connected to a specific record in Business Central. (E.g. the id of a customer in an external system related to customer 10000
.) Connections are stored on Entity level.
Returns an empty string if no connection was found.
Enum "Provider ID RWU"
- Specifies the enum ID of RESTwithUS provider.Enum "Entity ID RWU"
- Specifies the enum ID of RESTwithUS entity.Variant
- Specifies the record in Business Central. With Business Central 18 and newer you can use record SystemId for faster search.Text
- Specifies the description of RESTwithUS API provider.Text
- Specifies the description of RESTwithUS operation.Variant
- Specifies the record in Business Central. With Business Central 18 and newer you can use record SystemId for faster search.Text
Id of the record in an external system. If no match is found, returns an empty string.
//Get the id of the customer in an external system; the connections are stored in Customer entity
Customer.GET('10000');
MappingId := APIScriptRWU.MAPPING(ProviderID::TestProvider, EntityID::TestProvider_Customer, Customer);
IF MappingId = '' THEN
Error('Record not found in the external system.');
//Get the mapping id by provider/entity description
MappingId := APIScriptRWU.MAPPING('Test Provider', 'Customer', Customer);
//Get the mapping id by record SystemId (recommended for BC 18 and newer)
MappingId := APIScriptRWU.MAPPING(ProviderID::TestProvider, EntityID::TestProvider_Customer, Customer.SystemId);