Announcement

Collapse
No announcement yet.

Show/Hide Panels

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Show/Hide Panels

    Hi,

    We have the option to make fields visible or hidden according to a condition in Entity manager.
    Same way can we show/hide panels of entity detail through Layout Manager?

  • #2
    Hello

    You can control visibility here, or if you override the view and show / hide panels pragmatically. No UI way, as I know

    Comment


    • #3
      Ok tanya

      Comment


      • #4
        There is problem in panels

        When you create a custom panel from front-end name field doesn't get added to the Custom/Resources/layouts/Lead/detail.json

        So, when you use hide panel as in documentation it doesn't work.

        When you add panel, what code gets inserted is this (wrong Version)

        Code:
        [
            {
                "style": "info",
                "rows": [
                    [
                        {
                            "name": "planSelected"
                        },
                        {
                            "name": "role"
                        }
                    ],
                    [
                        {
                            "name": "accessType"
                        },
                        {
                            "name": "accessReason"
                        }
                    ],
                    [
                        {
                            "name": "isInvolvedInCase"
                        },
                        {
                            "name": "accessReasonOther"
                        }
                    ],
                    [
                        {
                            "name": "signUpAction"
                        }
                    ]
                ],
                "customLabel": "Form Fill"
            }
        ]
        What should get inserted is this: (correctVersion)
        Code:
        [
            {
                "style": "info",
                "rows": [
                    [
                        {
                            "name": "planSelected"
                        },
                        {
                            "name": "role"
                        }
                    ],
                    [
                        {
                            "name": "accessType"
                        },
                        {
                            "name": "accessReason"
                        }
                    ],
                    [
                        {
                            "name": "isInvolvedInCase"
                        },
                        {
                            "name": "accessReasonOther"
                        }
                    ],
                    [
                        {
                            "name": "signUpAction"
                        }
                    ]
                ],
                "customLabel": "Form Fill",
                "name": "formFill"
            }
        ]

        Then in Custom/Resources/metadata/clientDefs/Lead.json put this (correctVersion)

        Code:
        {
            "formDependency":{
                "source":{
                    "map":{
                        "Email Marketing":[
                            {
                                "action":"show",
                                "panels": [
                                    "formFill"
                                ]
                            }
                        ]
                    },
                    "default":[
                        {
                            "action":"hide",
                            "panels": [
                                "formFill"
                            ]
                        }
                    ]
                }
            }
        }

        With the correct version json, things started working for me.

        Clear the cache in the Administration panel once you update the json files.

        Comment


        • #5
          will be fixed in the next version

          Comment

          Working...
          X