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

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
v-yamao-msft
Community Support
Community Support

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.

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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors
Top Kudoed Authors
Users online (1,923)