JavaScript –

In this post I want to quickly review some of the commonly used methods of in terms of Dynamics 365 JavaScript.

I won’t document all of the capabilities here, just some of the methods I commonly use. If you need a full reference guide, please consult; Properties and Methods


Useful if you need the entity name for the current record.

Var entityName =;


Useful if you want to know the GUID for the current record;


Useful if you want to know if any unsaved changes exist.

var isDirty =;

This will return true is false is the page is dirty or not.


Useful if you want to return then primary name of the current entity. (So on contact it would show fullname, on account name etc etc.)

var name =;


Saves the current record!; // ** Just saves current record"saveandclose") // ** Does a save and close"saveandnew") // ** Save and new

These are all simple code snippets that are often used in JavaScript in Dynamics 365 forms. J

One thought on “JavaScript –

  1. Pingback: JavaScript – My Collection | Microsoft Dynamics CRM and Unified Service Desk

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s