none
Display Custom button on a custom enitty ribbon in CRM 2011 Only if a Lookup on Form is Null

    Question

  • Hi, I am trying to hide a button on CRM Ribbon for a custom entity "ContactHistory" only if a ContactID lookup on the "Contact History" form has not been populated (Lookup is null). Anyhelp on how to acheive this.
    Thanks, Future MVP
    Monday, July 11, 2011 2:30 PM

All replies

  • This link talks enabling, diabling, Hiding and Displaying the button based on a dropdown value. In mycase I have to Display or Hide based on Lookup Value. 

    The problem I can only have a <ValueRule> but the value rule requires value represented in string. SO how can I tell in value rule to check for Null on a lookup.

    My Scenario Ex.

    Contact ID LookUp is empty  then dont show the button

    Contact ID LookUp has a value then Show the button.

     

     

    Monday, July 11, 2011 4:12 PM
  • Check with
    <ValueRule Field="yourlookup" Value="null" InvertResult="true"/>
    
    


    Carsten Groth http://carstengroth.wordpress.com
    Monday, July 11, 2011 4:27 PM
  • Hey Carsten, thanks for the reply I actually did try that and it wont work. I tried use CustomRule and do it through JS but apparently the DisplayRule is not allowing CustomRule as a child element. SO I am kinda stuck now
    Thanks, Future MVP
    Monday, July 11, 2011 5:21 PM