locked
Hide Close as Lost Close as Won on Opportunity homepage ribbon RRS feed

  • Question

  • My requirement is to hide Close as Won and Close as Lost based on a field value.

    There are 2 ribbons that have Close as Won and Close as Lost ( opportunity homepage and opportunity form).

    On the opportunity form I can place the field X and hide it -- use either javascript or a valueRule/displayRule to hide the 2 buttons.

    What can I do on the opportunity homepage to hide those buttons based on FieldX value?

    Thank you!

    Wednesday, August 22, 2012 12:22 AM

Answers

  • hi,

    <ValueRule> (RibbonDiffXml)
    Use this rule to check the value of a specific field in the record being displayed in the form. You must specify the Field and the Value to check.

    value rule will not work for HomePage

    if u need to work u need to right enable rule in that use custom rule...write a js function and check with selected record id and check is value exist or not

    you cannot hide but you can enable or disable the button


    Please don't forget to Vote and marked as answer If this post answers your question or was helpful, please click "Mark As Answer" on the post and "Mark as Helpful" Be wise

    • Marked as answer by Yukimo Thursday, August 23, 2012 2:56 AM
    Wednesday, August 22, 2012 6:00 AM

All replies

  • Hi We can do this Simply ..

    First Download Visual Ribbon Editor

    http://crmvisualribbonedit.codeplex.com/

    And select Your Entity , Create a New Button , 

    Refer Bellow Link How to create a  new button.. 

    http://gtcrm.wordpress.com/2012/01/12/adding-record-creation-buttons-to-the-crm-2011-ribbon/

    http://crmdm.blogspot.in/2012/01/how-to-override-system-ribbon-button-in.html

     And Goto Enable Rules and Give Your Condition..

    As Bellow Image Create 

    Wednesday, August 22, 2012 4:46 AM
  • hi,

    <ValueRule> (RibbonDiffXml)
    Use this rule to check the value of a specific field in the record being displayed in the form. You must specify the Field and the Value to check.

    value rule will not work for HomePage

    if u need to work u need to right enable rule in that use custom rule...write a js function and check with selected record id and check is value exist or not

    you cannot hide but you can enable or disable the button


    Please don't forget to Vote and marked as answer If this post answers your question or was helpful, please click "Mark As Answer" on the post and "Mark as Helpful" Be wise

    • Marked as answer by Yukimo Thursday, August 23, 2012 2:56 AM
    Wednesday, August 22, 2012 6:00 AM
  • Hi,

       Just Add this Code in your xml

    <ValueRuleDefault="false"Field="Field Schema Name"InvertResult="false"Value="true"/>

    (//Value = "true" or "false" based on d value for which Buttons are to be hidden.)

    Also You can refer the following Links:
    http://crmdm.blogspot.in/2012/01/how-to-override-system-ribbon-button-in.html

    http://sumedha8.blogspot.in/2011/11/defining-enablerule-for-buttons.html

    You can use Visual Ribbon Editor Tool for Ribbon Customization as this will be easy and it can be downloaded from

    http://crmvisualribbonedit.codeplex.com/


    Naren

    Wednesday, August 22, 2012 7:01 AM
  • Pardon my ignorance but you have thrown some light into the homepage ribbon.

    1.  I cannot use valueRule.

    2.  But I can write a js function to find the record id of the selected record and determine if the value on the form exists or not.

    My questions are:

    (a) what event do I link the js script?

    (b) why can I not hide?  Because they are system buttons???

    Thanks!

    Thursday, August 23, 2012 2:10 AM
  • Thanks!  I think on the form ribbon the valueRule is applicable.  i am stuck with the homepage ribbon. 
    Thursday, August 23, 2012 2:53 AM
  • Anwar,

    I think I finally understood what you meant by "you cannot hide but you can enable or disable the button".  We can hide buttons based on security roles but in my case I key off the value of a field, so I can only enable/disable with the ValueRule on the form ribbon.

    Thanks!

    Thursday, August 23, 2012 2:56 AM
  • At Last it Worked !!

    Please don't forget to Vote and marked as answer If this post answers your question or was helpful, please click "Mark As Answer" on the post and "Mark as Helpful" Be wise

    Thursday, August 23, 2012 10:36 AM