Extend Custom View of SuiteCRM

Good Day!

Hello Everyone, I tried to have a custom UI/UX for one of my modules by extending sugarview. It was successful, and if I tried to access the detail view, it would display my custom detail view layout.But the problem is that when I tried to expand the subpanel of the Security Group, I got this error below:

This is how I implement it:
First, I created a view.detail.php at custom/modules/module name/views.

<?php
if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');

require_once('include/MVC/View/SugarView.php');

class UNI_MPOREvaluationViewDetail extends SugarView
{
    public function display()
    {
        $smarty = new Sugar_Smarty();
        $smarty->assign('id', $this->bean->id);
        $smarty->assign('mporno', $this->bean->name);
        $smarty->assign('module_name', 'UNI_MPOREvaluation');


        parent::display();
        $smarty->display('custom/modules/UNI_MPOREvaluation/tpls/EvaluationView.tpl');
    }
}

Second, is I added a custom tpl at custom/modules/module name/tpls.

<div class="moduleTitle">
    <h2 class="module-title-text">{$mporno}</h2>
    <div class="favorite" record_id="{$id}" module="{$module_name}">
        <div class="favorite_icon_outline">
            <span class="suitepicon suitepicon-favorite-star-outline"></span>
        </div>
        <div class="favorite_icon_fill" 'title="' . translate('LBL_DASHLET_EDIT', 'Home') . '" border="0" '="" style="display: none;" align="absmiddle">
            <span class="suitepicon suitepicon-favorite-star"></span>
        </div>
</div>
<div class="clear"></div>

This is just a sample since I just wanted to try if it works.

RESULT:

Never mind this post; I was able to figure out how to resolve this issue. I forgot to add this codes below to my tpl.

<table id="" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody>
        <tr>
            <td class="buttons" width="80%" nowrap="" align="left">
                <div class="actionsContainer">
                    <form action="index.php" method="post" name="DetailView" id="formDetailView">
                        <input type="hidden" name="module" value="{$module_name}">
                        <input type="hidden" name="record" value="{$id}">
                        <input type="hidden" name="return_action">
                        <input type="hidden" name="return_module">
                        <input type="hidden" name="return_id">
                        <input type="hidden" name="module_tab">
                        <input type="hidden" name="isDuplicate" value="false">
                        <input type="hidden" name="offset" value="2">
                        <input type="hidden" name="action" value="EditView">
                        <input type="hidden" name="sugar_body_only">
                    </form>
                </div>
            </td>
            <td class="buttons" width="20%" align="right">
            </td>
        </tr>
    </tbody>
</table>
2 Likes