customCode in custom Module disappear Input

When adding a customCode to editviewdefs.php the input for this field disappears.

It is a module created from the studio.

When I test this code in a module that is not custom (Contacts for example) it works correctly.

Does anyone know the difference between the module types and why the developed code doesn’t have the same effect on these?

I hope someone can guide me on this.

Thank you

Have you been checking both your logs? The answer should be in one of them…

Hola pgr…

Si, me fije y encuentro esto:
[WARN] Cannot find bean file for module:

Yo hago una consulta en uno de los archivos al bean… puede ser eso?

It seems you’re using an empty module name…

If you can post full code it’s much quicker to spot the problem

<?php

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

require_once 'modules/es_estudios/views/view.edit.php';

class Custom_es_EstudiosViewEdit extends es_estudiosViewEdit {





    public function __construct()
    {
        parent::__construct();
    }

    /**
     * @see SugarView::display()
     *
     * We are overridding the display method to manipulate the sectionPanels.
     * If portal is not enabled then don't show the Portal Information panel.
     */
    public function display()
    {
        $this->useForSubpanel = true;

        // habilitamos el valor del nombre en el archivo tpl (enviar y recibir archivos por medio de HTTP)
        $this->ss->assign('matricula', $this->bean->matricula);

        // cargamos el contenido del tpl en la variable
        $name_input_code = $this->ss->fetch('custom/modules/es_estudios/tpls/matriculaUnica.tpl.js');

        // enviamos el contenido a "editviewdefs"
        $this->ss->assign('validacionMatricula', $name_input_code);

        parent::display();

        }


    }

Why are you extending your custom module with custom code, instead of just putting your code directly into the module?

Hola PGR, gracias, fue de gran ayuda esto… soy medio nuevo en el crm y acabo de entender que para los modulos custom no hace falta agregar un customCode sino el script JS.

Ya estoy mas encaminado, ahora me falta hacer el cruce con el archivo php…

Consulta BD

$res = $db->query($sql);

if($db->getRowCount($res)>0){

  echo 1;

} else {

  echo 0;

}

Archivo JS

$('#matricula').blur(function(){

    var cod = $("#matricula").val();

    console.log(cod);

});

$.post('index.php?entryPoint=matriculaUnica',{codigo: $("#matricula").val(), record: document.EditView.record.value},

        function(data) {

             //  console.log(data);

               if (data===1) {

                   console.log("existe")

               }

               else if (data===0){

                   console.log("unico")

               }

        });

metadata->editview

   'includes' => 
      array (
        0 => 
        array (
          'file' => 'custom/modules/es_estudios/js/Matricula.js',
        ),
      ),