Cannot create record for Custom Entity

Nov 17, 2012 at 11:15 PM
Edited Nov 17, 2012 at 11:19 PM

Hi,

I'm trying to create new records for custom entities and i'm always receiving this error:

Error: 500: Internal Server Error: the specified entity does not exist.

This is the code:

	var zp_test = {};
	zp_test.zp_name = "Test name";
	
	XrmServiceToolkit.Rest.Create(
		zp_test,
		"zp_test",
		function (result)
		{
			var zp_testid = result.zp_testid;
			alert(zp_testid);
		},
		function(erro){ alert(erro.message);},
        false);

Does anyone have any tips about what i'm doing wrong?

 

Thanks.

Coordinator
Nov 22, 2012 at 7:25 PM

Hi There.

REST is case sensitive, so you need to make sure the name of your entity and attributes are the same name in CRM.

I found the easy way to build REST Query is to use the ODATA Query Designer http://crm2011odatatool.codeplex.com/

Hope this helps.

Jaimie

Nov 22, 2012 at 8:59 PM

Hi jaimieji,

You were right, it was a case sensitive problem. I'm new in crm and got confused since you may have different cases for .net coding and the REST/SOAP.

Thank you very much.