Basic Dynamics CRM javascript snippets #1

Here are some very often used snippets of javascript. This is post #1 of a series of many…

Hide tabs: = “none”; = “none”;

Show Tabs: = “block”; = “block”;

Hide Form Field:

document.all.fieldName.disabled = true;

Show Form Field:

document.all.fieldName.disabled = false;

Get a reference to the IFrame:

var _iframe = document.getElementById(“IFRAME_iFrameName”);

Set the source of an IFrame at run-time:

crmForm.all.IFRAME_iFrameName.src = “http://yourcrm/_controls/notes/notesdata.aspx?id=” + crmForm.all.customerid.DataValue[0].id + “&ParentEntity=3&EnableInlineEdit=false&EnableInsert=false”;

Change the paremeters as you see fit.

More to come later. Enjoy!


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

Create a website or blog at

Up ↑

%d bloggers like this: