Posts

Showing posts with the label Update Realeted Entity records

How to update related entity records in Dynamics CRM using javascript

In this blog, I am going to show how we can update a related entity record through JScript in DYnamics CRM either REST or OData way. First of all I'll show update data using REST Query in Method 1 and then using OData query in method 2. function btnUpdateOnClick() {     try {         var selectedRows = Xrm.Page.getControl("SubGridName").getGrid().getSelectedRows();         selectedRows.forEach(function (selectedRow, i) {             var s = selectedRow.getData().getEntity().getEntityReference();             var selectedRowGuid = s.id;             var selectedRowName = s.name;             var selectedRowEntityName = s.entityType;             UpdateAccount(selectedRowGuid, selectedRowName, selectedRowEntityName);         });     }   ...
go to top image