Common Error – Bad request when using Web API CRM 2016

Hi, I have come across an error while using web API, I was trying to retrieve and update values from one of entities.   Below is the API request. var id = Xrm.Page.data.entity.getId(); var entity = {}; entity.statecode = 1; entity.statuscode = 2; var req = new XMLHttpRequest(); req.open(“PATCH”, Xrm.Page.context.getClientUrl() + “/api/data/v8.0/quotes(” + id +Continue reading “Common Error – Bad request when using Web API CRM 2016”

CRM 2013 – Leveraging Actions to get around JavaScript cross-domain challenges

Originally posted on Salim Adamon – Dynamics 365 Blog:
Last year, I wrote about the challenge of cross-domain calls from JavaScript with CRM 2011. The issue was related to fact that from a security perspective, you could not have JavaScript functions executing on a CRM form event or when a ribbon button is clicked calling web…

Get Entity Type Code by Name from Javascript – CRM 2015/2016

Hi, There is a very easy way to get¬†Entity Type Code by Name like below var entityTypeCode = Mscrm.EntityPropUtil.EntityTypeName2CodeMap[“lead”];   this will be really helpful when you try opening a CRM form or window. I have tested this in both CRM 2015 and 2016 which worked as charm. Credits to :¬†https://blog.hompus.nl/2015/05/28/entity-type-code-using-javascript-only/ Thank you, Sreeni Pavalla