To remove the two buttons on the Phone activity, place the following javascript in the OnLoad event of the form.
if(document.getElementById('_MBcrmFormSaveAndClose')!=null)
{
document.getElementById('_MBcrmFormSaveAndClose').outerHTML =""
}
if(document.getElementById('_MBcrmFormSubmitCrmForm59truetruefalse')!=null)
{
document.getElementById('_MBcrmFormSubmitCrmForm59truetruefalse').outerHTML
=""
}
Posted at 18:10 PM
Email this entry to a friend
if(document.getElementById('_MBcrmFormSaveAndClose')!=null)
{
document.getElementById('_MBcrmFormSaveAndClose').outerHTML =""
}
if(document.getElementById('_MBcrmFormSubmitCrmForm59truetruefalse')!=null)
{
document.getElementById('_MBcrmFormSubmitCrmForm59truetruefalse').outerHTML
=""
}
Posted at 18:10 PM
Email this entry to a friend
Found on the MS Dynamics CRM website, answer provided by Alistaird @ 2b.net
To achieve what you want to do is fairly straight forward, all you need to do is add some code to the onLoad event of the lead form and enable the event. You can hide the the button in the initial load the tag name for the button and the menu item from memory are _MBConvertLead and _MIConvertLead.
The code example below will hide the button and the menu item after the record has been saved.
/********************************************************************/
/* HIDE Convert Lead Button
/********************************************************************/
var mi_elem = document.getElementById("_MIConvertLead");
var mb_elem = document.getElementById("_MBConvertLead");
if (mi_elem)
{
mi_elem.parentElement.parentElement.style.display = 'none';
}
if (mb_elem)
{
mb_elem.parentElement.parentElement.style.visibility= 'hidden';
}
/********************************************************************/
/* END HIDE Convert Lead Button
/********************************************************************/
Now you need to do a check on each off the fields using the onChannge event
for each field that you want to check
Something like the code below
/********************************************************************/
/* SHOW CONVERT BUTTON AND MENU
/********************************************************************/
if (crmForm.all.new_AttributeName1.DataValue != null &&
crmForm.all.new_AttributeName2.DataValue != null)
{
if (mi_elem)
{
mi_elem.parentElement.parentElement.style.display = 'block';
}
if (mb_elem)
{
mb_elem.parentElement.parentElement.style.display = 'visible';
}
}
/********************************************************************/
/* END CONVERT BUTTON AND MENU
/********************************************************************/
You will have to rename the new_AttributeName1 and new_AttributeName2 to the appropriate fields
Posted at 18:20 PM
Email this entry to a friend
To achieve what you want to do is fairly straight forward, all you need to do is add some code to the onLoad event of the lead form and enable the event. You can hide the the button in the initial load the tag name for the button and the menu item from memory are _MBConvertLead and _MIConvertLead.
The code example below will hide the button and the menu item after the record has been saved.
/********************************************************************/
/* HIDE Convert Lead Button
/********************************************************************/
var mi_elem = document.getElementById("_MIConvertLead");
var mb_elem = document.getElementById("_MBConvertLead");
if (mi_elem)
{
mi_elem.parentElement.parentElement.style.display = 'none';
}
if (mb_elem)
{
mb_elem.parentElement.parentElement.style.visibility= 'hidden';
}
/********************************************************************/
/* END HIDE Convert Lead Button
/********************************************************************/
Now you need to do a check on each off the fields using the onChannge event
for each field that you want to check
Something like the code below
/********************************************************************/
/* SHOW CONVERT BUTTON AND MENU
/********************************************************************/
if (crmForm.all.new_AttributeName1.DataValue != null &&
crmForm.all.new_AttributeName2.DataValue != null)
{
if (mi_elem)
{
mi_elem.parentElement.parentElement.style.display = 'block';
}
if (mb_elem)
{
mb_elem.parentElement.parentElement.style.display = 'visible';
}
}
/********************************************************************/
/* END CONVERT BUTTON AND MENU
/********************************************************************/
You will have to rename the new_AttributeName1 and new_AttributeName2 to the appropriate fields
Posted at 18:20 PM
Email this entry to a friend



