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
User Groups Public Preview

Join us for our User Group Public Preview!

Power Apps User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (26,318)