Unable to get property ‘get_element’ of undefined or null reference in CRM 2013.


Hi,

We were getting this error, while trying to add a new related child record through sub grid.

Only for few users with a specific role, we were getting this error. Installing the update rollup 2 fixed the issue.

http://cupofdev.com/crm2013-rollup2-fixlist/

http://www.microsoft.com/en-in/download/details.aspx

Hope it helps.

An item with the same key has already been added error while importing solution in CRM 2013


Hi,

Recently while importing a solution from dev environment to test environment we were getting this error.

This error occurs when we have some kind of mismatch among the attribute in both the environment for e.g. same attribute is created in both the environment with different datatype.

After comparing the dev and test environment, we realized that the Schema Name for one of the field was different in dev environment.

i.e. lss_Client_agress_to_LSSContract in test and lss_client_agress_to_lsscontract in dev

So we removed the field from form and deleted it in our dev environment.

After that import worked properly.

Hope this helps

Refreshing the Web Resource in CRM 2013.


In one of our Entity’s Form we were using HTML Web Resource and this HTML web resource was showing values of the attributes in that form.

Now in CRM 2011, after we save the record the form reloads and so our web resource was picking up the new values saved.

However in CRM 2013, on save, as the form doesn’t reload, the values were not getting updated in the HTML Web Resource.

So the solution was to refresh the Web Resource using Jscript on the On Save event of the form.


function refreshWebResArea() {

var webResArea = Xrm.Page.ui.controls.get("WebResource_Name");

webResArea.setSrc(webResArea.getSrc());
}

Hope it helps.

CRM 2013: Dude, Where’s My Radio Button?!


Nice post !

dynamicscrmgirl's avatardynamicscrmgirl

Seriously. Where have the radio buttons gone for “Two Options” type bit fields in CRM 2013?!

View original post 307 more words

Disabling all fields in CRM 2013


Hi,

We were using the below function in CRM 2011 for disabling all the fields in the form.

function makeAllAttributesReadOnly() {

var attributes = Xrm.Page.data.entity.attributes.get();

for (var i in attributes) {
var myattribute = Xrm.Page.data.entity.attributes.get(attributes[i].getName());
var myname = myattribute.getName();
Xrm.Page.getControl(myname).setDisabled(true);
}
}

However this function in CRM 2013 was giving us setDisabled field is undefined JavaScript error.

As it turned out it was because of the StateCode (Status) field in CRM 2013.

Modifying the above code to leave this particular field resolved the issue.

function makeAllAttributesReadOnly() {
var attributes = Xrm.Page.data.entity.attributes.get();
for (var i in attributes) {

var myattribute = Xrm.Page.data.entity.attributes.get(attributes[i].getName());
var myname = myattribute.getName();
if(myname == "statecode")
{
return;
}
Xrm.Page.getControl(myname).setDisabled(true);
}
}

Hope it helps.

Using Check Boxes in Mail Merge Templates in CRM 2011


Recently we had a requirement to add checkboxes in our mail merge templates. There are two options of adding checkboxes one is adding them as a symbol if we want user to check them after taking print out or if we want them to be clickable inside the word document itself using content control.

Check this helpful post

http://www.techrepublic.com/blog/microsoft-office/two-ways-to-add-checkbox-controls-to-a-word-document/

Hope it helps.