Updating a record from JavaScript using the Xrm.WebAPi in Dynamics 365 V9

Summary : Updating a record from JavaScript using the Xrm.WebAPi in Dynamics 365 V9

Now let’s update a record
Syntax: Xrm.WebApi.updateRecord(entityLogicalName, id, data).then(successCallback, errorCallback);

***Code starts here***

var entityData =
                    "subject": “leadFromWebApi_Updated”,
                    "lastname": “RamLaxman”

Xrm.WebApi.createRecord("lead", id, entityData).then(
                    function success(result)
                        alert("Record updated successfully ");                      
                    function (error)
***Code ends here***

Creating a record from JavaScript using the Xrm.WebAPi in Dynamics 365 V9

Create Record:

Let’s see how we can create a “Lead” record using newly introduced
 Web API calls in Dynamics 365 V9
// This line of code is required if you are creating from HTML webresource.

<script src="ClientGlobalContext.js.aspx" type="text/javascript"></script>

var entityData =

                    "subject": “leadFromWebApi”,
                    "lastname": “Ram”

Xrm.WebApi.createRecord("lead", entityData).then(
                    function success(result)
                        alert("Record Created successfully and Id is: " + result.id);
                        console.log("Account created with ID: " + result.id);
                    function (error)

How to Download Plugin Registration Tool from nuget Using Power Shell Script in Dynamics 365 Version 9.x

Summary :  How to Download Plugin Registration Tool Using Power Shell Script in Dynamics 365 Version 9.x 

1. Start menu, Search for Windows Powershell and open.
2. Navigate to the folder you want to install the tools to. For example (d:/Tools)
3. Execute the following Script

$sourceNugetExe = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe"
$targetNugetExe = ".\nuget.exe"
Remove-Item .\Tools -Force -Recurse -ErrorAction Ignore
Invoke-WebRequest $sourceNugetExe -OutFile $targetNugetExe
Set-Alias nuget $targetNugetExe -Scope Global -Verbose

##Download Plugin Registration Tool
./nuget install Microsoft.CrmSdk.XrmTooling.PluginRegistrationTool -O .\Tools
md .\Tools\PluginRegistration
$prtFolder = Get-ChildItem ./Tools | Where-Object {$_.Name -match 'Microsoft.CrmSdk.XrmTooling.PluginRegistrationTool.'}
move .\Tools\$prtFolder\tools\*.* .\Tools\PluginRegistration
Remove-Item .\Tools\$prtFolder -Force -Recurse

Virtual Entity feature in Dynamics 365 V9.x Part 2

Create a Virtual Entity Data Source
Login to Dynamics 365 click Settings -> Administration and then Virtual Entity Data Source to open the Data Sources grid.

In the Data Sources grid click on New, to open the Select Data Provider window

In Select Data Provider window select OData v4 Data Provider and then click OK to open the New OData v4 Data Source dialog

Create a Virtual Entity

Now, let’s create a virtual entity to bring data from the OData Source. Click Settings -> Administration -> Customize the System

Create a virtual entity like custom entity and select the Virtual Entity checkbox.

RPA: Blue Prism Training Course Content

                                              RPA: Blue Prism Training Content

Introduction to Blue Prism
  • Blue Prism’s Robotic Automation
Process Studio
  • Running a Process
  • Basic Skills
  • Process Validation
  • Decision Stage
  • Calculation Stage
  • Data Items
  • Review
Process Flow
  • Circular Path
  • Controlling Play
  • Set Next Stage
  • Break Points
  • Collections and Loops
  • Layers Of Logic
  • Pages For Organization
  • Review 
Inputs and Outputs
  • Input Parameters
  • Stepping and Pages
  • Data Item Visibility
  • Data Types
  • Output Parameters
  • Startup Parameters
  • Control room
  • Process Outputs
  • Review
Business Objects
  • Object Studio
  • Business Objects
  • Action Stage
  • Inputs and Outputs
  • The Process Layer
  • Review 
Object Studio
  • Creating a Business Object
  • Application Modeller
  • Spying Elements
  • Attributes
  • Attribute Selection
  • Launch
  • Wait
  • Timeouts
  • Terminate
  • Write
  • Press
  • Attach and Detach
  • Read
  • Actions
  • Action Inputs and Outputs
  • Data items as inputs
  • Review
Overview of Error and Case Management
Error Management
  • Exception Handling
  • Recover and Resume
  • Throwing Exceptions
  • Preserving the current exception
  • Exception Bubbling, Blocks and Exception handling in practice
  • Review
Case Management
  • Work Queues
  • Queue items
  • Work queue configuration’
  • Defer
  • Attempts
  • Pause and Resume
  • Filters
  • Reports
  • Review 
Additional Features
  • Collection Actions
  • Choice stage
  • Logging
  • Log viewer
  • System Manager
  • Process Groping
  • Export and import
  • Release Manager –Packages and Releases
Consolidation Exercise
  • Order system process
  • Consolidation exercise checklist
  • Submitting your completed solution
Advanced Features
  • Undefined collections
  • Data item initialization
  • Data item Exposure
  • Casting
  • Code stage
  • Run mode
  • Initialize and cleanup
  • Attribute Match Types
  • Dynamic Attributes
  • Active Accessibility
  • Application manager mode
  • Global clicks and keys
  • Credentials
  • Environment Locking
  • Command Line
  • Resource PC
Further Application Types
  • Mainframe Applications
  • Java Applications
  • Match index and Match Reverse
  • Surface Automation

Virtual Entity feature Pros and Cons in Dynamics 365 V9.x.

Summary : Virtual Entity feature in Dynamics 365 V9.x.

Virtual Entity helps us to get data from External network without any client-side and server-side approaches. It helps admins and system customizers in administration and configuration.
Virtual Entity looks in D365 to user as a regular entity but contains data that is sourced from external data system

What is Virtual Entity?
Virtual Entity is an Entity in D365 platform metadata without the associated physical tables for entity instances created in D365 database.
How it works?
During runtime, when an entity instance is required, its state dynamically retrieved from the associated external data source. Each virtual entity is associated with a “virtual entity data provider” from an associated virtual entity data system.
  1. End users can be able to view the records created by Virtual Entities in fields, grids and search results.
  2. System Customizers can create these virtual entities without writing any code.

a           1.  Data retrieved by Virtual Entity is “Read-Only”.
b           2.  It must be possible to model the External data as a Dynamics 365 entity.
*      All the entities in external data source must have an associated GUID primary key.
*      All entity properties must be represented as Dynamics 365 attributes.
*      An attribute on a virtual entity cannot be calculated or rollup. If any, it must be done on the external side, possibly within or directed by the data provider.
c           3. Only Organization-owned entities are supported.
d           4. Field level security is not supported.
e           5. Auditing of data is not supported.
f.        Once created, we cannot change a virtual entity to non-virtual entity (standard entity) and in the same way we cannot convert non-virtual entities to virtual entities once created.
following data PROVIDERS SHIP with Dynamics 365 (online), V9.0
1         An OData v4 provider is included with the service and installed by default.
  1. An Azure Cosmos DB (formerly Microsoft Document DB) provider is available from AppSource.

Popular Posts