Answered by:
hide convert lead button in lead

Question
-
Hi,
i need to hide the "Convert Lead" button in Lead.And i am using this code to hide it.document.getElementById('_MBconvertLead').style.display='none';
First time when i am opening the lead form it is getting hidden.But when i maximise
the form again the "Convert Lead" button is showing.Can anyone tell what will be the
problem for this?How i can fix this?thanks,
kishen
Monday, January 31, 2011 7:20 AM
Answers
-
Hi Kishen,
You can use something like below.
Use IE developer toolbar to find out the title of the button, then check for the title.
function EnabledDisabledISVButton(toolTipsText,flag) { var lis = document.getElementsByTagName('LI'); var i = 0; while (i < lis.length) { if (lis[i].getAttribute('title') == 'Qualify or disqualify the leads') { //Replace the DHTML with blank tags to hide the button //lis[i].outerHTML='<SPAN></SPAN>' lis[i].disabled=flag; //true | false } i = i + 1; }
Thanks, Ankit Shah
Inkey Solutions, India.
Microsoft Certified Business Management Solutions Professionals
http://www.inkeysolutions.com/MicrosoftDynamicsCRM.html- Marked as answer by DavidJennawayMVP, Moderator Thursday, March 31, 2011 7:31 AM
Monday, January 31, 2011 9:52 AM
All replies
-
Hi Kishen,
You can use something like below.
Use IE developer toolbar to find out the title of the button, then check for the title.
function EnabledDisabledISVButton(toolTipsText,flag) { var lis = document.getElementsByTagName('LI'); var i = 0; while (i < lis.length) { if (lis[i].getAttribute('title') == 'Qualify or disqualify the leads') { //Replace the DHTML with blank tags to hide the button //lis[i].outerHTML='<SPAN></SPAN>' lis[i].disabled=flag; //true | false } i = i + 1; }
Thanks, Ankit Shah
Inkey Solutions, India.
Microsoft Certified Business Management Solutions Professionals
http://www.inkeysolutions.com/MicrosoftDynamicsCRM.html- Marked as answer by DavidJennawayMVP, Moderator Thursday, March 31, 2011 7:31 AM
Monday, January 31, 2011 9:52 AM -
Monday, January 31, 2011 6:36 PM
-
hi Ankit ,
How can I achieve this in CRM 2011?
PoojaMonday, April 18, 2011 6:59 AM -
Hi Pooja,
You can use setVisible() method to hide a button. Refer below code to hide left nave button.
/* Hide Left Nav Buttons */
Xrm.Page.ui.navigation.items.get("navConnections").setVisible(false);
Thanks, Ankit Shah
Inkey Solutions, India.
Microsoft Certified Business Management Solutions Professionals
http://www.inkeysolutions.com/MicrosoftDynamicsCRM.html- Proposed as answer by Ankit Himmatlal Shah Monday, April 18, 2011 8:44 AM
Monday, April 18, 2011 8:40 AM -
Hi,
thanks for the reply Ankit, but I dont wnat to hide navigation element. i want hide ribbon button "Qualify" or "reactivateLead" based on role of current user .
Can you please tell me how to do it?
PoojaMonday, April 18, 2011 8:49 AM -
Hi Pooja,
Please visit below URL to hide ribbon button
http://gtcrm.wordpress.com/2011/02/23/hiding-a-ribbon-button-in-crm-2011/
Thanks, Ankit Shah
Inkey Solutions, India.
Microsoft Certified Business Management Solutions Professionals
http://www.inkeysolutions.com/MicrosoftDynamicsCRM.htmlMonday, April 18, 2011 9:15 AM -
hi Ankit,
In given link we can hide button but not on some condition like in my case ,
i want to hide Reactivate Lead button only for user with perticular role like saleperson and not for all users .
how to do that ?
PoojaMonday, April 18, 2011 9:54 AM -
Hi Pooja,
It seems like there is no supported way to do this. Please visit below two threads. You could ask Ketan if he has achieved the same.
http://social.microsoft.com/Forums/en-US/crm/thread/f5989f2f-9c49-4548-bd10-8fff7af530f9/
http://social.microsoft.com/Forums/en-US/crmdevelopment/thread/ca042a77-b37c-4c4f-9cde-2768a8c59bc4/
Thanks, Ankit Shah
Inkey Solutions, India.
Microsoft Certified Business Management Solutions Professionals
http://www.inkeysolutions.com/MicrosoftDynamicsCRM.htmlMonday, April 18, 2011 9:58 AM