I am currently working on a JavaScript function that utilizes OData to create a record in the PhoneCall entity. The requirement is for the Subject attribute of this PhoneCall entity to be unique. I came across information about the "SuppressDuplicateDetection" parameter in the following link - https://msdn.microsoft.com/en-us/library/hh210213.aspx
How can I incorporate this parameter into my OData call?
Below is the snippet of my JavaScript code:
var serverUrl = Xrm.Page.context.getServerUrl() + '/XRMServices/2011/OrganiationData.svc/PhoneCallSet'
$.ajax
({
type: "POST",
contentType: "application/json; charset=utf-8",
dataType: "json",
url: serverUrl,
data: phoneCallData,
beforeSend: function(xhr)
{
xhr.setRequestHeader("Accept", "application/json");
},
success: function (data, textStatus, XmlHttpRequest)
{
// Success logic goes here
},
error: function (xmlHttpRequest, textStatus, errorThrown)
{
// Error handling goes here
},
async: false
});