Dynamics CRM 2011 · Javascript

More CRM 2011 Useful JavaScript tidbits

Get record GUID

var recordId = Xrm.Page.data.entity.getId()lvar recordIdWithoutCurlyBraces = Xrm.Page.data.entity.getId().substring(1,37);

Get event source

var eventSource = executionContext.getEventSource(); // tick Pass execution context as first parameter

Get event source (fieldname)

var fieldName = executionContext.getEventSource().getName(); // tick Pass execution context as first parameter

Get event source (value)

var fieldValue= executionContext.getEventSource().getValue(); // tick Pass execution context as first parameter

For more Javascript tidbits click here.

Cheers – Sy

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s