HELP ARTICLE

Failed to create record.: Property “Editable” for Ship-to Address is invalid!


When creating a Sales Order or Sales Invoice in Business Central, you will receive an error like the one shown above if trying to define a Ship-to Address.

*Note that any code provided is for use as a point of reference and will not be supported by eOne Solutions.

 

Cause

When you change the address in Business Central, you first need to switch the flag “ShipToOptions”, but this field is not available through the web services. If you try to change one of the other Ship-to fields before changing the flag, you will receive the above error. The standard Business Central web services are unable to bypass this error, therefore you will need to create a customization.

 

Resolution

There are two ways to approach this. The first is to edit the existing Sales Order/Invoice pages to allow the flag to be accessed through the web services. The second option is to create a new page using the “Sales Header” table to update these fields. I prefer the second option, because it reduces the risk of the changes harming the experience on the existing pages.

 

First, you will want to review the existing page to see what logic is being run against those fields and make sure you recreate any necessary logic on your new code. This will ensure that a user won’t open a record that was modified through the API and receive a validation error. Next, all fields will be added to the page so they can be mapped. Finally, an XML file can be added to publish the page as a web service so SmartConnect can use it.

 

Below is a sample extension I created that creates the custom page and publishes it. You can make any changes necessary and deploy to your environment. My extension will work as an update on an existing order, but not to create an order. First SmartConnect will need to use the standard Sales Order page to create the order, then go back and update the Ship-to information.

 

GitHub repository with sample code.

RECENT POSTS


Accessing SmartConnect after purchasing a subscription on behalf of your customer
Disassociate a CRM Record
How to drop and recreate all the SmartList Builder stored procedures
Failed to connect to the CRM server : Failed to get CRM Organizations : Access is denied
Connection could not be validated when using Excel data source

POPULAR POSTS


Removed Part: /xl/vbaProject.bin part. (Visual Basic for Applications (VBA))
SSL Security error using OLEDB Connection
Manufacturing Serial Trace SmartList Builder Template
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

ARCHIVES

open all | close all

TAGS

Business Central CRM Dynamics 365 dynamics crm Dynamics GP Dynamics NAV Econnect Employee Spotlight eone eOne News eOne Spotlight Events Excel Excel Report Builder Extender Extender Enterprise Flexicoder GP GPUG integration Meet the Team Microsoft dynamics crm Microsoft Dynamics GP Office Relationships partners Popdock release Reporting SalesForce SalesForce.com scripting SmartConnect SmartConnect.com SmartConnect Bootcamp SmartConnect Office Hours SmartList SmartList Builder SmartList Designer SmartView SQL Support Tech Tuesday Templates training Zendesk

Integrate & Automate without Any Code.

SmartList Data has Never Been Faster.

The Easiest Way to Report on GP Data.