I read this article and decided to make something similar for CRM 2011. You can see results in this post.
Hard-work-days of Freelance Developer (Microsoft Dynamics CRM, Microsoft SQL, .Net)
My name is Andrii Butenko (Azzik for friends). I work as Microsoft Dynamics CRM Developer. Here i'll post ideas and interesting solutions which connected with Microsoft Dynamics CRM, Microsoft SQL and .Net. I beg a pardon for my terrible English. My native is C#.
Saturday, February 11, 2012
Wednesday, February 08, 2012
CRM 2011: Playing with notes control
If you want for some reason to allow/disallow user to insert or edit notes in Microsoft Dynamics CRM 2011 following code can help you:
Copy script, insert it to webresource, add this webresource to required form and call it during onload/onchange of form. And you should not forget that this script is unsupported because it uses document object and it's methods.
function FormatNotesControl(AllowInsert, AllowEdit)
{
var notescontrol = document.getElementById('notescontrol');
if (notescontrol == null)
return;
var url = notescontrol.src;
if (!AllowInsert)
url = url.replace("EnableInsert=true", "EnableInsert=false");
if (!AllowEdit)
url = url.replace("EnableInlineEdit=true", "EnableInlineEdit=false");
notescontrol.src = url;
}
function DisableNotesInsert()
{
FormatNotesControl(false, true);
}
Copy script, insert it to webresource, add this webresource to required form and call it during onload/onchange of form. And you should not forget that this script is unsupported because it uses document object and it's methods.
Labels:
Java Script,
Microsoft CRM 2011,
Unsupported
CRM 2011: Creating a Network Path Text Control for Microsoft Dynamics CRM 2011
Following approach is a little bit unsupported so be careful using it.
Create JavaScript webresource, put in it following code, call OnLoad method during loading of form of your entity:
Field has to be simple text type. Replace new_name with field you want to transform. Result for my case:
Create JavaScript webresource, put in it following code, call OnLoad method during loading of form of your entity:
function OnLoad()
{
Transform("new_name");
}
function Transform(fieldid)
{
var c = document.getElementById(fieldid);
if (c == null)
return;
c.style.textDecoration = "underline";
c.style.color = "blue";
c.style.cursor = "hand";
c.ondblclick = function()
{
window.open(Xrm.Page.getAttribute(fieldid).getValue());
};
}
Field has to be simple text type. Replace new_name with field you want to transform. Result for my case:
Labels:
Java Script,
Microsoft CRM 2011,
Unsupported
Friday, January 06, 2012
MVP Renewed - 2
Third year in a row I have got MVP award.
This year was the most complicated in my life and I'm glad to get this award one more time.
This year was the most complicated in my life and I'm glad to get this award one more time.
Labels:
MVP
Friday, November 25, 2011
Visual Studio 2010 - The version of clr.dll in the target does not match the one mscordacwks.dll was built for
I have prepared new virtual machine for one project (WS 2008, SQL 2008, CRM 2011, VS 2010). I had to develop several plugins and I faced with issue - when I tried to debug plugin and attach to w3wp process I have got following error message - The version of clr.dll in the target does not match the one mscordacwks.dll was built for.

I googled and have found possible solution - Install SP1 for VS 2010. After installation and reboot of virtual machine I was able to attach to w3wp and debug plugins without any issue.

I googled and have found possible solution - Install SP1 for VS 2010. After installation and reboot of virtual machine I was able to attach to w3wp and debug plugins without any issue.
Labels:
Debug,
Error,
Visual Studio 2010
Monday, November 07, 2011
CRM 2011 - reports on data auditing
One of forum visitor asked about building reports based on Audited data. I have never worked with it in CRM 2011 so I decided to recheck how does it store information in DB. Confusing is wrong word for the feelings I've felt... Denormalized data which is impossible to analyse with SQL statements. Anyway following query can help you to build your own reports based on this information:
Labels:
Data Audit,
Microsoft CRM 2011,
Reports,
T-SQL
Monday, August 29, 2011
CRM 4.0 - detach answered email from queue
One of my customers requested following functionality - detach email from queue when email is answered.
Solution consists of 2 parts - customization of email (addition of source email field and JavaScipt which will extract id of source email) and Plugin which will handle Send message.
Solution consists of 2 parts - customization of email (addition of source email field and JavaScipt which will extract id of source email) and Plugin which will handle Send message.
Labels:
C#,
Customization,
Fetch,
Java Script,
Microsoft CRM 4.0,
Plugin,
Queue
Subscribe to:
Posts (Atom)