“This control only accepts strings or null as input” error message


when you will try to assign integer value to nvarchar attribute in MS CRM like below

var IntVal=10;

Let’s say we have one field named “ABC” having nvarchar datatype

crmForm.all.ABC.DataValue=IntVal;

you will get error “This control only accepts strings or null as input”. to solve this issue you can use toString() method of JS like below

crmForm.all.ABC.DataValue=IntVal.toString();

Enjoy !!!

Advertisements

Leave a comment

Filed under MS CRM & Javascript, MS CRM 4.0

Leave a Reply

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