How to Show cases as popup in Account Detail View?

we are using sugarcrm community edition and we want to show Cases in account detail view as a popup. Please tell us how can we do that. if someone opens the account and if that particular account has the cases in it doesnt matter opened cases or closed it should appear as popup in the Detail View of Accounts..

please help your support is appreciated.

Thanks

Parents
  • Hi Gaurav,

    Just to move ahead, you can start with writing javascript code in view.detail.php file of Accounts module - custom/modules/Accounts/views/view.detail.php or a separate js file and include it in your detailviewdefs.php - custom/modules/Accounts/metadata/detailviewdefs.php

    As you are using SugarCE, you can make use of yahoo ui library to create popup and use standard ajax call to bring data from PHP file and display on the popup.

    Let us know if this helps.

    Regards.

    Hats

  • can you make a replacement file for me if possible and i will replace it with the files here??

    custom/modules/Accounts/views/view.detail.php

    Please let me know if you can do it i would really appreciate it. thanks

  • Hats, Can we talk on phone?? 

Reply Children
  • Hi gaurav narula,

    This customization involves a bit of HTML and javascript coding. You just have to design a basic HTML tabular layout to display a list of cases and then a javascript code to make an AJAX call to PHP file to fetch data and populate on the HTML layout. You can also use Show/Hide button to toggle the tabular view.

    Regards.

    Hats

  • hello Hats

    i created a popup in javascript and able to show the popup with the if statement for phone number

    but i need to show the popup with the Case details like if there is any case linked to the the account then it should show popup otherwise it should not do anything...

    Please check my code and suggest me accordingly

    thanks

               if(empty($this->bean->phone_office)){
                
                
            }               
    else {
            echo '<script type="text/javascript" src="modules/Accounts/sweetalert.min.js"></script>';   

        echo $js=<<<EOF

        <script>
        
    swal("Refund Or Chargeback!", "Please check cases for this customer", "warning");

    </script>

    EOF;
    }