locked
Outlook Offline, Resetting Data Filters RRS feed

  • Question

  • Let’s say you built a business engine (a real fat client) that runs on outlook offline client. You set all the custom entities to go offline and change the local data filters so all the information the application needs exits (e.g. configuration entities, metadata entities, supporting entities and custom business entities). Now, the user accidentally or intentionally reset the data filters and kills your entire application with a click of a button. The funny thing is the you can restrict the user from deleting, changing state and updating the filters but the reset data filters function completely ignores the plug-in model so there is no way to intercept this (I hope I’m wrong).

     

    Can anybody shed some light on this issue? Is there a supported way to restrict the user from resetting all data filters?

     

    Any help appreciated.

     

    Adi


    Blog: http://mscrm4ever.blogspot.com/ * Website: http://gicrm.upsite.co.il/
    Thursday, April 30, 2009 10:35 AM

Answers

  • Hi Jurgen,

     

    The requirement is to restrict the user from resetting the data filters or creating new filters on entities that are considered metadata and are required when the user is offline.

     

    The problem is twofold:

    1. The Create message on the user query entity is not supported in a plug-in
    2. The Resetting of data filter request bypasses the entire plug-in mechanism.

     

    Currently the only supported way of restricting the user from adding or resetting filters (for metadata entities) is to bind to the execute message as follows:

     

    Pre Execute event: hide metadata filters if user is not admin (i.e. context.UserId != context.InitiatingUserId) by excluding the custom entities codes from the user query FetchXml. (This Disables Updates and Delete of metadata entities)

     

    Post Execute (Async) event: recreate the metadata filters for all users (admin mode) or for a single user, depending on the user who is making the changes, each time the Local Data Filters Dialog is used (Overrides resetting of data filters and creation of new filters)

    Very painful solution - still in development.  


    Blog: http://mscrm4ever.blogspot.com/ * Website: http://gicrm.upsite.co.il/
    Monday, May 4, 2009 3:22 PM

All replies

  • Hi Adi,

    have you tried to intercept the child pipeline for filters?

    Best regards,
    Jürgen
    Jürgen Beck

    Dipl. Kfm./Wirtschaftsinformatik
    MVP, MCSD.NET, MCITP DBA, MCDBA, MCSE
    Microsoft Certified Business Management Solutions Professional
    Microsoft Certified CRM Developer
    Microsoft Certified Trainer

    ComBeck IT Services & Business Solutions
    Microsoft Gold Certified Partner
    Microsoft Small Business Specialist

    Developing & Supporting Business Applications from small business to big enterprises covering scores of sectors

    http://www.combeck.de
    Thursday, April 30, 2009 10:38 AM
    Moderator
  • Yes, I tried every supported plug-in message/configuration I can think of. The platform seems to completely ignore this.
    Am I missing something? It just does not seem reasonable that the user can reset all filters without some kind of supported intervention.


    Blog: http://mscrm4ever.blogspot.com/ * Website: http://gicrm.upsite.co.il/
    Thursday, April 30, 2009 10:56 AM
  • Hi Adi,

    sorry, no idea, except of an unsupported SQL Server Trigger.

    Best regards,
    Jürgen
    Jürgen Beck

    Dipl. Kfm./Wirtschaftsinformatik
    MVP, MCSD.NET, MCITP DBA, MCDBA, MCSE
    Microsoft Certified Business Management Solutions Professional
    Microsoft Certified CRM Developer
    Microsoft Certified Trainer

    ComBeck IT Services & Business Solutions
    Microsoft Gold Certified Partner
    Microsoft Small Business Specialist

    Developing & Supporting Business Applications from small business to big enterprises covering scores of sectors

    http://www.combeck.de
    Thursday, April 30, 2009 11:28 AM
    Moderator
  • Thanks Jürgen,

     

    Trigger is not an option. I know what needs to be done in order to solve this using unsupported means but I really want to keep this supported since the entire solution is supported. Anyone else cares to comment / experienced configuring the reset data filters using supported means?


    Blog: http://mscrm4ever.blogspot.com/ * Website: http://gicrm.upsite.co.il/
    Thursday, April 30, 2009 1:20 PM
  • Hi Adi,

    could you please post me what steps you have taken so I can ask the CRM Product Team?

    Best regards,
    Jürgen
    Jürgen Beck

    Dipl. Kfm./Wirtschaftsinformatik
    MVP, MCSD.NET, MCITP DBA, MCDBA, MCSE
    Microsoft Certified Business Management Solutions Professional
    Microsoft Certified CRM Developer
    Microsoft Certified Trainer

    ComBeck IT Services & Business Solutions
    Microsoft Gold Certified Partner
    Microsoft Small Business Specialist

    Developing & Supporting Business Applications from small business to big enterprises covering scores of sectors

    http://www.combeck.de
    Monday, May 4, 2009 2:45 PM
    Moderator
  • Hi Jurgen,

     

    The requirement is to restrict the user from resetting the data filters or creating new filters on entities that are considered metadata and are required when the user is offline.

     

    The problem is twofold:

    1. The Create message on the user query entity is not supported in a plug-in
    2. The Resetting of data filter request bypasses the entire plug-in mechanism.

     

    Currently the only supported way of restricting the user from adding or resetting filters (for metadata entities) is to bind to the execute message as follows:

     

    Pre Execute event: hide metadata filters if user is not admin (i.e. context.UserId != context.InitiatingUserId) by excluding the custom entities codes from the user query FetchXml. (This Disables Updates and Delete of metadata entities)

     

    Post Execute (Async) event: recreate the metadata filters for all users (admin mode) or for a single user, depending on the user who is making the changes, each time the Local Data Filters Dialog is used (Overrides resetting of data filters and creation of new filters)

    Very painful solution - still in development.  


    Blog: http://mscrm4ever.blogspot.com/ * Website: http://gicrm.upsite.co.il/
    Monday, May 4, 2009 3:22 PM
  • Hi Adi,

    Sounds nice. So it seems you have found a solution (workaround) for your problem.

    Best regards,
    Jürgen
    Jürgen Beck

    Dipl. Kfm./Wirtschaftsinformatik
    MVP, MCSD.NET, MCITP DBA, MCDBA, MCSE
    Microsoft Certified Business Management Solutions Professional
    Microsoft Certified CRM Developer
    Microsoft Certified Trainer

    ComBeck IT Services & Business Solutions
    Microsoft Gold Certified Partner
    Microsoft Small Business Specialist

    Developing & Supporting Business Applications from small business to big enterprises covering scores of sectors

    http://www.combeck.de
    Monday, May 4, 2009 3:29 PM
    Moderator