Zoeken in deze blog

donderdag 21 oktober 2010

Uitvragen aantal veld (2011)

function noe()
{
var locAttr = Xrm.Page.data.entity.attributes.get("numberofemployees");
alert(locAttr.getValue());
}

dinsdag 19 oktober 2010

Eigenschappen van een Lookup uitvragen (2011)

function Test()
{
var LookupItem = Xrm.Page.data.entity.attributes.get("primarycontactid");
if (LookupItem.getValue() != null)
{
// The GUID of the lookup
alert(LookupItem.getValue()[0].id);

// The text value of the lookup
alert(LookupItem.getValue()[0].name);

// The entity type name
alert(LookupItem.getValue()[0].typename;

// The entity type code of the lookup 1=account, 2=contact
alert(LookupItem.getValue()[0].type);
}
}

maandag 4 oktober 2010

2011 – Hide Areas of a Form

These code snippets will hide specific areas of the Form.

// Hide the Ribbon Toolbar and move the form Content area to the top of the window.
window.top.document.getElementById(“crmTopBar”).style.display = “none”;
window.top.document.getElementById(“crmContentPanel”).style.top = “0px”; // Move Form Content area up to top of window, initial style.top is 135px

// Hide Left Hand Nav bar / pane
document.getElementById(“crmNavBar”).parentElement.style.display = “none”;
document.getElementById(“tdAreas”).parentElement.parentElement.parentElement.parentElement.colSpan = 2;

// Hide the Breadcrumb and Record Set Toolbar
document.getElementById(“recordSetToolBar”).parentElement.style.display = “none”;

// Hide the Form Footer Bar
document.getElementById(“crmFormFooter”).parentElement.style.display = “none”;

Original Post by Rhett Clinton