This was possible and was a help to almost all the developers. But after doing this some would need to hide the buttons(Add new and Add existing buttons) from the associated view.
For this i found a nice JS which was written in the below post. This was written for hiding one particular button, but i changed it to hide both button by calling the same functions. However all credit must go to the original poster as without that i wouldn't have got the idea to do this. Thanks mate.
http://social.microsoft.com/Forums/en/crmdevelopment/thread/1e8eeb04-947f-4cea-920d-4fa1946f633d
My Changed JS Snippet....
function HideAllViewButtons(Iframe) {
Iframe.onreadystatechange = function HideTitledButtons() {
if (Iframe.readyState == 'complete') {
var iFrame = frames[window.event.srcElement.id];
var liElements = iFrame.document.getElementsByTagName('li');
for (var i = 0; i < liElements.length; i++) {
if (liElements[i].getAttribute('title').indexOf('Add existing') != -1) {
liElements[i].style.display = 'none';
}
if (liElements[i].getAttribute('title').indexOf('Add a new') != -1) {
liElements[i].style.display = 'none';
}
}
}
}
}
This blog describes mostly about the work (CRM 365, CRM 2016, CRM 2015, CRM2011, CRM 4.0, CRM 3.0, C#,Javascript and SQL Server) i do.
Tuesday, December 28, 2010
Tuesday, December 14, 2010
Plugin Event - Associate and Disassociate Records
There is no plugin event for the association and disassociation events.
However there is a workaround for this in the below URL.
http://www.avanadeblog.com/xrm/2010/05/i-find-your-lack-of-events-disturbing.html
However there is a workaround for this in the below URL.
http://www.avanadeblog.com/xrm/2010/05/i-find-your-lack-of-events-disturbing.html
Subscribe to:
Posts (Atom)
Retrieving Calendar of a Bookable Resource in Dynamics
There are occasions where we need to retrieve working days and working times of a resource in Dynamics grammatically. This is quite possible...
-
There is a bit of change in CRM 2011 than CRM 4. The code is below. Microsoft.Xrm.Sdk. EntityReference Moniker1 = new Microsoft.Xrm.S...
-
When you create a new security role from scratch and then assign only that role to a system user and when you log to the CRM site you might ...
-
There are occasions where we need to retrieve working days and working times of a resource in Dynamics grammatically. This is quite possible...