Skip to main content

Posts

Showing posts from 2020

Dynamics 365 CRM retrieve data using JavaScript

What is OData in Dynamics CRM? Open Data Protocol ( OData ) is a standard protocol for consuming data exposed by Dynamics . OData is a Representational State Transfer ( REST ) based protocol. It can be applied to all types of technologies, including JavaScript Object Notation ( JSON ). To retrieve single record data using JavaScript function   CheckPrimaryContactId ( executionContext ) {      formContext  =  executionContext . getFormContext ();      var   primarycontactid  =  formContext . data . entity . attributes . get ( "primarycontactid" );      if  ( primarycontactid . getValue () !=  null ) {          entityId  =  primarycontactid . getValue ()[ 0 ]. id . slice ( 1 , - 1 );          entityName  =  primarycontactid . getValue ()[ 0 ]. entityType ;  ...