cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Microsoft Employee

Dynamics CRM Flow + Country Region and Zipcode

Hey Guys,

 

Been having a play with the PowerApps / Common Data Model alongside Flow for Microsoft Dynamics CRM.

I've created a Flow that is Triggered on Create of an Account within CRM, which then retrieves the associated Primary Address (from CRM). Then I attempt to Insert a new Company to the CDM via Flow.

 

All seems to be good but I've had the below 400 Error returned, which refers to
'Country Region' and 'Postal Codes' tables. However, I cannot see these tables listed in my CDM Entities? - Are these hidden/unavailable?

 

Can someone shed light on this as well as provide information/documentation relating to any other underlying dependencies between the tables?

 

Thanks!

Error:


"status": 400, "message": "Write failed for table row of type 'RTSCompany'. Infolog: Warning: The value 'UK' in field 'Country' is not found in the related table 'Country Region'.; Warning: validateField failed on field 'RTSCompany.PostalAddress_Country_CountryId'; Warning: The value 'W2 6PY' in field 'Zipcode' is not found in the related table 'Postal codes'.; Warning: validateField failed on field 'RTSCompany.PostalAddress_PostalCode_PostalCode'; Warning: The value 'London' in field 'State' is not found in the related table 'States'.; Warning: validateField failed on field 'RTSCompany.PostalAddress_State_ProvinceId'.", "source": "rts-connector.powerapps.com" }

2 REPLIES 2
Community Support Team
Community Support Team

Re: Dynamics CRM Flow + Country Region and Zipcode

Hi Ojward,

 

I created the same flow with you and I also got the error message.

 

From the error message I knew that several fields were not found in Company entity. In the Excel downloaded from Company entity, fields which were shown in error message were not displayed in the Excel. So I tried to add three fields(Country, State, Zipcode) in Company entities. Then when a new Account was crated in CRM, the flow ran, but it was failed. An error message was shown and more fields were asked.

 

This is the flow error:
{
  "status": 400,
  "message": "Write failed for table row of type 'RTSCompany'. Infolog: Warning: Field 'Country_CountryId(Country_CountryId)' must be filled in.; Warning: validateField failed on field 'RTSCompany.PostalAddress_Country_CountryId'; Warning: Field 'PostalCode_PostalCode(PostalCode_PostalCode)' must be filled in.; Warning: validateField failed on field 'RTSCompany.PostalAddress_PostalCode_PostalCode'; Warning: Field 'State_ProvinceId(State_ProvinceId)' must be filled in.; Warning: validateField failed on field 'RTSCompany.PostalAddress_State_ProvinceId'.",
  "source": "rts-connector.powerapps.com"
}

 

For this issue, You could send a feedback by using the smile icon.

smile icon flow.PNG
 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Microsoft Employee

Re: Dynamics CRM Flow + Country Region and Zipcode

Thanks Mabel,

 

Have submitted via the Smiley Icon in Flow, but this seems to be a CDM/PowerApps issue, as it is to do with the Data Model and the (not visible) tables storing Country, Region, ZipCode etc.

I also tried exporting the Company table using a Gateway - No address attributes listed.

 

Be grateful for anypointers on this.

 

Cheers,

Oli

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 329 members 7,058 guests
Please welcome our newest community members: