locked
Is it possible to hide certain records? RRS feed

  • Question

  • For example:

    I have an account entity with 5 records. Say I wish to hide 3 records who have a certain attribute such as hide being true. Is that possible so that when someone clicks account, they only see 2 records who's hide attribute is false.

    Thanks in advance.
    Jon
    Friday, May 10, 2013 11:25 PM

Answers

  • You can hide the values of custom fields using Field Level Security. If they are out of the box fields or there is some other reason this approach wouldn't work you would need to write some JavaScript on the form's OnLoad event to hide/show the fields based on your criteria.

    Jason Lattimer
    My Blog -  Follow me on Twitter -  LinkedIn

    Saturday, May 11, 2013 2:30 AM
    Moderator
  • Hi Jon,

          I am assuming you are talking about hiding in view where there are 5 Account records. You can achieve this by using filter for the view which displays the records. If you are not able to use static filter, you can use fetchXML query and update the filter for the view dynamically. Dynamic view does not work in all situations so it would help if a bit more about what you are trying to achieve is known.


    Hope this helps.
     
    -----------------------------------------------------------------------
     Minal Dahiya
     
    If this post answers your question, please click "Mark As Answer" on the post and "Vote as Helpful"

    • Proposed as answer by Minal Dahiya Saturday, May 11, 2013 5:11 AM
    • Marked as answer by cdmjlee Monday, May 13, 2013 7:42 PM
    Saturday, May 11, 2013 5:11 AM
  • There is no OOB to hide records based on fields. If you could instead associate it with ownership you could achieve it by assigning appropriate security roles. To hide records based on attribute values, you could try to implement a plugin registered on RetrieveMultiple message and manipulate the output results collection in the plugin so that only the records you want be returned back in the collection.

    HTH

    Sam


    Dynamics CRM MVP | Inogic | http://inogic.blogspot.com| news at inogic dot com

    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    • Proposed as answer by Sam - Inogic Monday, May 13, 2013 3:16 AM
    • Marked as answer by cdmjlee Monday, May 13, 2013 7:42 PM
    Monday, May 13, 2013 3:16 AM

All replies

  • You can hide the values of custom fields using Field Level Security. If they are out of the box fields or there is some other reason this approach wouldn't work you would need to write some JavaScript on the form's OnLoad event to hide/show the fields based on your criteria.

    Jason Lattimer
    My Blog -  Follow me on Twitter -  LinkedIn

    Saturday, May 11, 2013 2:30 AM
    Moderator
  • Hi Jon,

          I am assuming you are talking about hiding in view where there are 5 Account records. You can achieve this by using filter for the view which displays the records. If you are not able to use static filter, you can use fetchXML query and update the filter for the view dynamically. Dynamic view does not work in all situations so it would help if a bit more about what you are trying to achieve is known.


    Hope this helps.
     
    -----------------------------------------------------------------------
     Minal Dahiya
     
    If this post answers your question, please click "Mark As Answer" on the post and "Vote as Helpful"

    • Proposed as answer by Minal Dahiya Saturday, May 11, 2013 5:11 AM
    • Marked as answer by cdmjlee Monday, May 13, 2013 7:42 PM
    Saturday, May 11, 2013 5:11 AM
  • I think you are talking about views in the account entity?

    You can create your own view and filter that view with condition "certain attribute " field=false.


    puja jain

    Sunday, May 12, 2013 4:32 AM
  • well, I think it denpends on your business requirment as well, do you want set the account is hidable when it created or you want hide it afterwards?

    1. since you metioned hide attribute, then I assume those account records will already decided whether if it  be 'seen' or not 'seen' when they created. in this case, you just add a bool field to indicate whether hide, then modify the view for certain roles. it should works

    also, since every someone have roles, you could modify the view base on roles to let them see or can't see certain records,

    Sunday, May 12, 2013 11:38 PM
  • There is no OOB to hide records based on fields. If you could instead associate it with ownership you could achieve it by assigning appropriate security roles. To hide records based on attribute values, you could try to implement a plugin registered on RetrieveMultiple message and manipulate the output results collection in the plugin so that only the records you want be returned back in the collection.

    HTH

    Sam


    Dynamics CRM MVP | Inogic | http://inogic.blogspot.com| news at inogic dot com

    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    • Proposed as answer by Sam - Inogic Monday, May 13, 2013 3:16 AM
    • Marked as answer by cdmjlee Monday, May 13, 2013 7:42 PM
    Monday, May 13, 2013 3:16 AM