locked
Insert a filter on the Activity view RRS feed

  • Question

  • Hi

    My customer wants me to make an Iframe on the Account which only shows Activities which is NOT from a Opportunity. This isnt as easy as it sounds.

    I cant filter the associated view on the Activity-entity, and when it comes to making my own view with a filter on activities made from an opportunity, I donw think I can show this view in the Iframe?

    Any1 got a good idea. I will prefer not to code this.

    By the way it is CRM 4.0 On-Premise 

    Friday, October 15, 2010 8:12 AM

Answers

All replies

  • You can show your custom view in the IFrame also as everything in dynamics crm has it's addressable URL form. Just create a view with the required filtering. Navigate to it and click on More Actions->Copy Shortcut of Current View. Place the copied URL as the source to the IFrame on your form. I never tried but just check whether this will workout.

    Thanks
    Vicky

    http://howto-mscrm.blogspot.com

    "Please Mark it as Answer if it solves your query"

    Friday, October 15, 2010 9:26 AM
  • Actually Account is parent entity and Activities and Opportunity are child entities of Account. We can always go from child record to parent record and get the results by fetchxml. Now you want Activites which are regarding to an Account which does not have an Opportunity. If I am correct than you can create a bit field in Account and when an opportunity is created this bit field is true. By doing so you will categories your Account into two categories i.e. one with Opportunity and one without Opportunity. Make you iframe based on this bit field.

    Regards

    Faisal

    Friday, October 15, 2010 9:37 AM
  • I would recomend you to take the advantage of using "Embedding Advanced find view in Entity Form" rather than using "Custom Views"

    You can refer below links for acheving those.
    http://crmentropy.blogspot.com/2009/11/embedding-advanced-find-views-in-entity.html
    http://mscrm4ever.blogspot.com/2009/03/display-fetch-in-iframe-part-2.html

    Custom View are easy to be created and displayed. But the main reason for me suggesting this method rather than "Custom View" is

    When a Custom View is directly opened by calling from its URL it pops up error. (Bug reported to Microsoft)

    Refer below links for more information
    forums
    Steps for replication.

    Regards
    Vinoth

    Friday, October 15, 2010 9:59 AM
  • Faisal gave some good pointers. However, it may happen that an acitivity can be created for an account even if it has an opportunity or an opportunity
    can be created for an exising account which already has activities. Inorder to make the solutions work for all we need check for OjbectTypeCode of regarding field for each activity. One approach is to retrieve associated activities by checking above condition and display selected records in a custom aspx application. Display this custom aspx page in IFrame.

    Even you can a bit field in each activity type form(EMail, PhoneCall etc.) and set it based on the regarding type field on onload/onchange javascript. In advanced find view you can query against this. However as the bit field is on the activity type form(ex. EMail, PhoneCall etc.) you can query against individual type only. So you need to have advanced find view for each type of activity and display them in individual IFrames.

    Just try any of these approaches. Hope it helps you.

    @Vinodh: Thanks for letting us know about the bug.

    Thanks
    Vicky
    http://howto-mscrm.blogspot.com
    "Please Mark it as Answer if it solves your query"

    Friday, October 15, 2010 1:01 PM