Incorrect attribute value type System.String in Dynamics 365 (CRM)

We were getting the below error while creating an entity record through a C# Console Application.

This occurred because the code was trying to set string value to one of the decimal type field.

Parsing the string value to decimal and then setting it fixed it.

Hope it helps


Author: Nishant Rana

I love working in and sharing everything about Microsoft.NET technology !

5 thoughts on “Incorrect attribute value type System.String in Dynamics 365 (CRM)”

Share your thoughts

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s