Skip to content
+1-888-319-3663

HELP ARTICLE

Business Central error- Key “XXX” is not well formed! – when trying to delete a record


I’m trying to delete a Customer record in Business Central/NAV using the SmartConnect SOAP CustomerCard endpoint.
When I run the integration, it fails with the error:

Failed to delete record with Keys ‘Key = XXX’ Key “XXX” is not well formed!

Why do I get this error?



The reason for the error is a mismatch for the data provided for the Key field on this integration.
In this case, using the CustomerCard SOAP endpoint, the only field required to delete the Customer record is the “Key” field.

Notice that the field is “Key” and not “No”.

The No field in Business Central/NAV is a human readable such as “PTR”.
The Key field in Business Central/NAV is a long identifier such as “16;EgAAAAJ7/1AAVABS7;31847521;22;AgedAccReceivableChart1;16;EgAAAAJ7/1AAVABS7;31847520;

In this case, the error happened because the “No” field was mapped to the “Key” field on that map.  Because the Key field wasn’t in the correct format, Business Central gave this error.

There are two solutions:

1. Using the SOAP connector, since we likely do not have the hidden Key field, we can use SmartConnect to look that up for us using a Page Field Lookup.

This lookup type will return the Key for a record if you give it the fields to look up with.  Typically this would be the No field but it could be a combination of other fields of No wasn’t available for some reason.

Once the calculation for the Page Field Lookup is created, map this new lookup to the Key field on the entity and group on this field.



2. Using the ODATA connector in SmartConnect 20.18.1.11 and greater, we can also delete records.

In this case, we wouldn’t need to use a lookup.  Instead, we just map our field(s) to tell Business Central which fields to match and delete with – No in this case since we have it – and mark the For Delete option. 



Example maps for both solutions using SmartConnect 20.18.1.11 are ATTACHED.

RECENT POSTS


Configuring Salesforce Integration User
Business Central Extension Publish Error
Re-registering a Change Data Source in Business Central on SmartConnect.com
Moving SmartConnect 21 to a new server
eConnect error 4628 - The Tracking Number (Tracking_Number) is empty

POPULAR POSTS


SSL Security error using OLEDB Connection
This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms
Removed Part: /xl/vbaProject.bin part. (Visual Basic for Applications (VBA))
The server process could not be started because the configured identity is incorrect.
Using WINSCP and a task to upload or download files from an SFTP site

CATEGORIES

TAGS

Business Central CRM D365 Business Central Dynamics 365 dynamics crm Dynamics GP Dynamics NAV Econnect Employee Spotlight eone eOne News error Error Message Events Excel Excel Report Builder Extender Flexicoder GP integration Map Microsoft dynamics crm Microsoft Dynamics GP Navigation List Builder Office Relationships Partner All Hands Call Popdock promotions release Salesforce Salesforce.com SmartConnect SmartConnect.com SmartConnect Bootcamp SmartConnect Maps SmartConnect Office Hours SmartList SmartList Builder SmartPost SmartView SQL Tech Tuesday Templates training Zendesk

Integrate & Automate without Any Code.

SmartList Data has Never Been Faster.

The Easiest Way to Report on GP Data.