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:

tab0Tab.style.display = “none”;

tab1Tab.style.display = “none”;

Show Tabs:

tab0Tab.style.display = “block”;

tab1Tab.style.display = “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:

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 )

Connecting to %s

Create a website or blog at WordPress.com

Up ↑

%d bloggers like this: