locked
CRM2011: Is it possible to stop certain tabs/sections on form to load using plugins? RRS feed

  • Question

  • Hello,

     Is it possible to stop certain tabs/sections to load on a form from server side instead of using javascript to show/hide?

    Thanks,

    Thursday, October 18, 2012 9:09 PM

Answers

  • Hello,

    As far as I know this is impossible.

    What you can do is to hide tab/section during design time (checkbox "Visible by default" should be unchecked) and show it in case tab/section should be shown.

    • Marked as answer by HanVo Monday, October 22, 2012 5:43 PM
    Thursday, October 18, 2012 9:51 PM
    Answerer
  • Alternatively, you could also create different forms and assign them out to different security roles or lock down certain fields using field security profiles. These methods would prevent the data from being rendered to the client.

    Jason Lattimer

    Friday, October 19, 2012 1:41 AM
    Moderator

All replies

  • Hello,

    As far as I know this is impossible.

    What you can do is to hide tab/section during design time (checkbox "Visible by default" should be unchecked) and show it in case tab/section should be shown.

    • Marked as answer by HanVo Monday, October 22, 2012 5:43 PM
    Thursday, October 18, 2012 9:51 PM
    Answerer
  • Alternatively, you could also create different forms and assign them out to different security roles or lock down certain fields using field security profiles. These methods would prevent the data from being rendered to the client.

    Jason Lattimer

    Friday, October 19, 2012 1:41 AM
    Moderator
  • Hi,

    you can also achieve this using plugins. You can develop and register a plugin to the "RetrieveMultiple" message of the entity whose subgrid data you wish to filter or to hide. In this plugin you can inspect the query that is used to retrieve the records and you can also find out the user that is currently trying to view these records. Based on that info you could filter out the data returned or even completely remove the records that are returned, so that the user sees no records.

    But this is a fallback strategy that you should only use if you can't configure everything via security concepts, as Jason already suggested.

    Greetings,

    Pavlos


    Please mark this reply as an answer and vote it as helpful if it helps you find a resolution to your problem.
    View my latest gallery contribution here.
    Visit my blog here.

    Friday, October 19, 2012 6:28 AM
  • Hi,

    The quick answer is no. Of course you could, like Jason mentioned, create alot of forms for this entity and try assigning them to different roles. I don´t know if this will solve your problem (we had a similar challenge - and this was not sufficient for us).

    In most cases you need to do it on the client by using js.


    --- Best regards Henrik Skydtsgaard

    Friday, October 19, 2012 6:43 AM
  • Currenly, we use both form level security and js to show/hide information. Users have access to forms by roles; and on each form, sections/tabs will be available based selected values of some fields. We have some performance issue due to the amount of fields/data. I just thought if we could do something on the server side but I guess not. Thanks everyone for your inputs.
    Monday, October 22, 2012 5:42 PM