<turbo-stream action="update" target="wiki_card"><template>
<h1>Internal_InvalidTableRelation</h1>
<div>&nbsp;The below error will be displayed when you are writing into a table in Business Central and the provided value is not accepted by Business Central. This is usually caused by those scenarios where the field is a picklist field in Business Central and it does not accept a value that's outside of the allowed list. In order to fix it, you would need to send the right one or build a formula to extract the data in the expected format:&nbsp;<br><br><br></div><p>The REST service returned a status code that is not 20x - i.e. not OK - Status code received: 400 Bad Request Response body: {"error":{"code":"Internal_InvalidTableRelation","message":"<strong>The field Country/Region Code of table Contact contains a value (CANADA) that cannot be found in the related table (Country/Region</strong>). CorrelationId: ecb62be5-fde8-4310-9137-e46981d6eae1."}} Data Sent to REST service: {"Mobile_Phone_No_U2S":null,"Fax_No":null,"E_Mail":"abc@ymail.com","Type":"Person","First_Name":"Name","Surname":"Surname","<strong>Country_Region_Code":"Canada</strong>","County":null,"Company_No":"CT00000","Salesperson_Code":"INT'L","Home_Page":null,"ABC_Product_Groups":null}<em><br></em><br>You have 2 options:&nbsp;<br><br>1. Turn the field into a picklist in both systems so the data will match;<br>2. Add a formula to extract the correct data from other tables/objects: ##DBLOOKUP('DESTDS','CountriesRegions','Name',"MailingCountry",'Code') where you perform a lookup on a destination table called "CountriesRegions" and if Name = MaillingCountry, the result will be the Code. And the 'Code' will be value that you need.&nbsp;<br><br><br></p>
</template></turbo-stream>

<turbo-stream action="replace" target="meta_description"><template><meta content='Internal_InvalidTableRelation' id='meta_description' name='description'></template></turbo-stream>
<turbo-stream action="replace" target="meta_keywords"><template><meta content='Internal_InvalidTableRelation' id='meta_keywords' name='keywords'></template></turbo-stream>
<turbo-stream action="update" target="meta_title"><template>Internal_InvalidTableRelation - MyRapidi Wiki</template></turbo-stream>
<turbo-stream action="prepend" target="flash"><template></template></turbo-stream>
