locked
Javascript to open Records Associated View RRS feed

  • Question

  • Hello,

    We have updated to CRM 2015 and our end-users hate the new navigation. HATE IT. Like, refuse to use it, and are calling to leadership to get Salesforce hate it.

    To prevent them from having to use it, I currently have subgrids on the Account record form that show Activities, Opportunities, etc. These clutter the form though and have received many complaints on their own. What I need is quite simple:

    I need javascript to load the records associated view for Activities and Opportunities (and eventually any other related record).

    The idea here is that I can simply put buttons on the Account form that if they click them, they will be transported to the records associated view for whatever record type they have clicked. This would make life MUCH easier for them and could definitely curb adoption for the better. Thanks!

    John

    Wednesday, July 22, 2015 2:38 PM

Answers

  • John,

    I believe that you haven't attentively rechecked reference I provided so I will repeat my answer one more time with proves.

    1. Recheck reference I provided earlier and put attention to setFocus function. What it does - it emulates click on top-navigation bar for current record that leads to navigation to related item (that applies to Associated Views as well).

    2. Recheck this thread that describes real-life issue and solutions that almost 1 to 1 fits to yours - https://social.microsoft.com/Forums/en-US/137c6dae-9011-4ecc-b3c7-3b1b925a2812/crm-2011-loadarea?forum=crm

    3. I understand what are you talking about and I implemented your scenario for one of my customers 2 years ago but unfortunately I have no source code and access to environment now. But I can insist that getting of correct navigation item and calling setFocus function of navigation item worked fine for CRM 2011 and CRM 2013. Haven't tried it for 2015 but based on SDK article I mentioned in my initial reply I can assume that it is still applicable for CRM 2015.


    Dynamics CRM MVP
    My blog



    Wednesday, July 22, 2015 4:51 PM
    Moderator

All replies

  • Hello John,

    I believe that you should look on navigationItems. Seems that setFocus method is what you are looking for.


    Dynamics CRM MVP
    My blog

    Wednesday, July 22, 2015 2:44 PM
    Moderator
  • This appears to alter items on the navigation bar. This is not what I'm looking for. I don't care about the navigation bar at all.

    I need to use javascript to do the navigation. If you go into the navigation bar and you click opportunities, you are moved to the Records Associated view for Opportunities.

    I need examples of javascript that would navigate me to the Records Associated View. I've seen posts of people talking about pulling this off, but they don't say how they did it.

    Thanks.

    Wednesday, July 22, 2015 3:41 PM
  • John,

    I believe that you haven't attentively rechecked reference I provided so I will repeat my answer one more time with proves.

    1. Recheck reference I provided earlier and put attention to setFocus function. What it does - it emulates click on top-navigation bar for current record that leads to navigation to related item (that applies to Associated Views as well).

    2. Recheck this thread that describes real-life issue and solutions that almost 1 to 1 fits to yours - https://social.microsoft.com/Forums/en-US/137c6dae-9011-4ecc-b3c7-3b1b925a2812/crm-2011-loadarea?forum=crm

    3. I understand what are you talking about and I implemented your scenario for one of my customers 2 years ago but unfortunately I have no source code and access to environment now. But I can insist that getting of correct navigation item and calling setFocus function of navigation item worked fine for CRM 2011 and CRM 2013. Haven't tried it for 2015 but based on SDK article I mentioned in my initial reply I can assume that it is still applicable for CRM 2015.


    Dynamics CRM MVP
    My blog



    Wednesday, July 22, 2015 4:51 PM
    Moderator
  • I apologize for misreading. That link seems useful and has some code examples. Thanks.
    Wednesday, July 22, 2015 5:10 PM
  • NP and good luck with user adoption. It is sooo pain in the back )

    Dynamics CRM MVP
    My blog

    Wednesday, July 22, 2015 5:12 PM
    Moderator
  • Thanks! I was able to achieve what I was looking for using the method you posted. Thanks again.
    Wednesday, July 22, 2015 6:52 PM