none
Have Opportunities show ALL vs OPEN under an Account?

    Question

  • Hey everyone, searched for this but couldn't find it.  When I'm in an account and I click Opportunities, is there any way to have the drop down default to ALL vs just showing OPEN?  It's a pain to have to always change it to All to see if there's other opportunities on there.  Can't seem to find where I'd change that?  Thanks!
    Tuesday, November 30, 2010 4:04 PM

All replies

  • Hi Liam, there are a couple of ways of doing this:

    1. Use a form OnLoad script to intercept the view as it loads and modify the default filter setting from Open to All. You'd need to reuse the same script on every form where the associated opportunities view appears (i.e. contact and account).
    2. Modify the definition of the associated opportunity view by exporting the XML and hacking it.

    I don't think either approach is supported, but both approaches have been used by others and I think are described here:
    http://social.microsoft.com/Forums/en-US/crmdevelopment/thread/85615ccd-b8e9-48d3-a906-4fd7b301dac0

    Let me know how you get on.


    Neil Benson, CRM Addict and MVP at Customery Ltd. You can reach me on LinkedIn or Twitter. Join over 10,000 other CRM professionals on the Microsoft Dynamics CRM group on LinkedIn.

    Tuesday, November 30, 2010 4:18 PM
  • Thanks I gave it a try but having issues, I don't really know Javascript that well.  Here's their example:

     

    var navElement = document.getElementById('navContracts');
     if (navElement != null) {
     navElement.onclick = function LoadAreaOverride() { 
      loadArea('areaContracts');
      SetDefaultOption(document.getElementById('areaContractsFrame'));
     }
     }
    
    
    
     
    function SetDefaultOption(Iframe) { 
     if (Iframe != null ) {
     Iframe.onreadystatechange = function SetOption() { 
      if (Iframe.readyState == 'complete') { 
      var iFrame = frames[window.event.srcElement.id]; 
      var selectBox=iFrame.document.getElementById('statecode');  
       selectBox.options[2].selected=true;     
      } 
     } 
     }
    }

    Where would I find the fields I need instead of areaContracts, navContracts and areaContractsFrame? They're using the Contracts view but I'm using Accounts and want it to show all for Opportunities. I tried making it areaOpportunitites etc but it just did nothing, no error messages just doesn't do anything. I put this in the OnLoad for the Accounts form as well I assume? Sorry thanks!

    Wednesday, December 01, 2010 2:46 PM
  • Hi Liam, I understand the feeling of not being a developer but needing to customise your CRM system. I'm a CRM architect and analyst, with a sales user background not IT development. But every now and again I need to get my hands dirty too.

    Here's how to find the names of the bits you need to refer to in your JavaScript.

    Using IE8, open an account form. Hit F12 -- this loads the IE Developer Tools window (used to be an add-on for earlier IEs, but built into IE8). In the Developer Tools window, use the Find > Select Element by Click feature. Then switch to your CRM account form. Now as you hover over the form elements you'll see a little blue box appear. Click on the associated Opportunities link in the left-hand nav area of the account form. The Developer Tools window should update to reveal the HTML reference for that element in the form. In your JavaScript you probably need to refer to the HTML id element that might appear a line or two above the highlighted part in Developer Tools (I usually need to take a couple of swings at this to get my references right).

    Or, if you are even lazier (like me), learn to get better at using Bing and not writing your own JavaScript!
    http://www.eggheadcafe.com/software/aspnet/35465772/opportunity-associated-view-and-the-filter.aspx

    Hope this helps.


    Neil Benson, CRM Addict and MVP at Customery Ltd. You can reach me on LinkedIn or Twitter. Join over 10,000 other CRM professionals on the Microsoft Dynamics CRM group on LinkedIn.

    • Proposed as answer by Jeff Loucks Saturday, December 04, 2010 6:14 PM
    Thursday, December 02, 2010 11:43 AM
  • Awesome thank you!!!  The lazier way was much easier works perfectly!  Never used bing prefer google but usually have bad luck when trying to find things like this.  Works great now thanks!
    Saturday, December 04, 2010 5:38 PM