Back

How to Navigate This D365 Business Central Sales Invoice Integration Error: Failed to create record. ‘Comment’ is not an option.

Published: Nov 06, 2026
Post Author Written by Pat Roth

If you’d like to watch a video explaining this, see below or click here.

Failed to create record: ‘Comment’ is not an option.

In SmartConnect, I’m creating Microsoft Dynamics 365 Business Central Sales Invoices and line items using the SalesInvoice OData page (Page 43).

In the integration, I need to bring in various line types including Items, G/L Accounts and Comments.

Previewing the data, everything seems correct including the LineType and value being passed to Business Central.

My Items & G/L Account lines come in fine, but my Comment lines fail with the error:

Business Central supports ‘Comment‘ lines, and integrated drop-down values usually match the words shown in the Business Central user interface. So it’s puzzling that this one fails.

Why This Happens

Normally, you DO use the same value for a drop-down list that you see in the Business Central UI. The Comment value for LineType is an exception: the UI shows the label “Comment”, but the value stored behind it is blank.

Look closely at the error message and you’ll notice the list of options starts with a comma. That’s because the first option is an empty value, and that empty value is what Business Central expects for Comment lines (instead of G/L Account, Item, etc.).

How to Fix

The fix is to pass an empty value for LineType on ‘Comment‘ lines, and pass all other line types as they are.

Without changing the source data, the easiest fix is to create a calculation to handle the exception.

if _LINETYPE = "Comment" then
   return ""
else
  return _LINETYPE
end if
if (_LINETYPE == "Comment")
{
    return "";
}
else
{
    return _LINETYPE;
}
if (this._LINETYPE === "Comment") {
   return "";
} else {
   return this._LINETYPE;
}

In the calculation, we check for the specific value “Comment” and, if found, return an empty string. Otherwise, we return the original value.

After mapping the calculation to the LineType field, the integration ran successfully and included the comment line.

You can download the SmartConnect 21.1.0.1705 onprem solution from the link below.

Feeling stuck? Get the support and guidance you need to help you power through any data challenge

We're on your integration team. Connect with our people and let us know how we can help you.