Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 46379

Creating an contact record using the OData endpoint with JavaScript

$
0
0

Hi all,

I am trying to create a contact record using the OData endpoint with JavaScript, here is my code: 

function CreateNewContact()
{
var contact= {};

contact.lastname= "Test JS Contact";

SDK.REST.createRecord(
contact,
"contact",
function (contact)
{
alert("Account Created with name" + " " + contact.lastname);
},
errorHandler
);

function errorHandler(error) {
writeMessage(error.message);
}
}

I guess this is not creating any contact record in Contact Entity. 

What might have gone wrong ?

Thanks.


Viewing all articles
Browse latest Browse all 46379

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>