function DeleteAccount() { //get Server url var serverURL = Xrm.Page.context.getClientUrl(); //create Xml request object var service = new XMLHttpRequest(); //below line is used to delete the entity record service.open("DELETE", serverURL + "/api/data/v8.0/accounts(1DD18913-11CB-E511-80D2-C4346BDC11C1)", false); service.setRequestHeader("Accept", "application/json"); service.setRequestHeader("Content-Type", "application/json; charset=utf-8"); service.setRequestHeader("OData-MaxVersion", "4.0"); service.setRequestHeader("OData-Version", "4.0"); service.send(); if (service.readyState == 4 /* complete */) { if (service.status == 204) { //show alert message alert('Field Value Deleted'); } else { var error = JSON.parse(service.response).error; //show error message alert(error.message); } } }
Friday, 20 May 2016
Delete Record in in Microsoft Dynamics CRM 2016 using Web API
Subscribe to:
Post Comments (Atom)
Read only field , get latest value from read only field in in power app portal
Below line is used to make field readonly in power app portal through js $( "#bdo_relationshiprole_name" ).parent().css( "po...
-
To Query MS CRM DB there are the two distinct ways. Using QueryExpression Using FetchXML Limitation of the QueryExpression is , If yo...
-
In the following code actionName is the name of action. primarycontact and parentaccount is the entityreference attribute in action. nam...
-
To retrieve meta data of global optionSet in Web API, first you will need to retrieve meta data id of option Set. So i create two functi...
No comments:
Post a Comment