Manually create Connection between Business Central record and record in an external system. If the connection for the same entity and record already exists, it will be replaced.
Enum "Provider ID RWU"
- Specifies the enum ID of RESTwithUS provider.Enum "Entity ID RWU"
- Specifies the enum ID of RESTwithUS entity.Text
- Specifies the ID of the record in an external system.Variant
- Specifies the record in Business Central.Text
- Specifies the human readable description of the record in an external system.var
NewAPIMapping Record "API Mapping RWU"
- Return the record of newly created mapping.Boolean
True if the connection was successfully created or updated.
var
APIMappingRWU: Record "API Mapping RWU";
Customer: Record Customer;
//Basic usage
Customer.GET('10000');
IF NOT APIScriptRWU.CREATE_MAPPING("Provider ID RWU"::RWUTest; "Entity ID RWU"::TestProvider_Customer, 3, Customer, 'Customer Name') THEN
Error('Connection was not created');
//Work with the newly created connection record
APIScriptRWU.CREATE_MAPPING("Provider ID RWU"::RWUTest; "Entity ID RWU"::TestProvider_Customer, 3, Customer, '', APIMappingRWU);