I create manually text field in suitecrm but not store database

Hi all,

    I create manually text field in suitecrm but not store database .

Regards,
Rajkumar V

How did you create that field? Studio? Module builder? And in which module?

hi erevodifosin,

This is my code kindly see this sir,

    In view.edit.php under display function. this will give the basic layout of edit view-

$phone_numbers = ‘

Array.LBL_ID_FF_ADD
’;

$this->ss->assign(‘PHONENUMBERS’,$phone_numbers);

Then you need to assign this in metadata/editviewdefs.php in the form of customCode.

‘customCode’ => ‘{$PHONENUMBERS}’,

then inculde the js file in metadata/editviewdefs as below-

‘file’ => ‘custom/modules/Contacts/js/custom.js’,

file: custom.js

var add_phoneNumber = function(){
var phone_count = parseInt($(’#phone_count’).val());
var incr_count = phone_count + 1;
var select_phonetype = ‘HomeOffice PhoneMobileFaxAlternateOthers’;

str_append = ‘

’+select_phonetype+’ ';

$("#tbl_phone").last().append(str_append);
$(’#phone_count’).val(incr_count);
}

var remove_phoneNumber = function(res){
var decr_count = parseInt($(’#phone_count’).val()) -1;
$(res).closest( ‘tr’).remove();
$(’#phone_count’).val(decr_count);
resetTheOrder();
}

function resetTheOrder(){
var input = $(’#tbl_phone input’).attr(‘name’,’’);
var select_val = $(’#tbl_phone select’).attr(‘name’,’’);
var button = $(’#tbl_phone button’).attr(‘name’,’’);

$.each(input,function(index,value){
var incr_val = index+1;
$(value).attr(‘name’,‘phone_’+incr_val).prop(‘id’,‘phone_’+incr_val);
});

$.each(select_val,function(index,value){
var incr_val = index+1;
$(value).attr(‘name’,‘sel_’+incr_val).prop(‘id’,‘sel_’+incr_val);
});

$.each(button,function(index,value){
var incr_val = index+1;
$(value).attr(‘name’,incr_val).prop(‘id’,incr_val);
});
}

Hi erevodifosin,

       I need help sir,

This code is getting for account and user table values this one is pk sir but I need Project table data also how will get sir kindly help me sir(this is relationship module)

                       function generateComposeFtsDataPackage($data,$forFullCompose = TRUE, $bean = null)

{

global $current_user;
if( isset($data['parent_type']) && !empty($data['parent_type']) &&
isset($data['parent_id']) && !empty($data['parent_id']) &&
!isset($data['ListView']) && !isset($data['replyForward'])) {

	$User = new User(); //user object
          
	$User->retrieve($bean->assigned_user_id);	
            
            
	$assigned_reporting_id = $User->reports_to_id;

}