Hooks Bankentries

Hello,

I just created a new module. This module creates bank records too. So, I’d like to display in bankentries_list.php file my records with getNomUrl() as native modules. Right now, I get label of my record with hyperlink no more.

I tried using getNomUrl() Hook to banktransactionlist context but it doesn’t works at all.

some help or any idea?

Thanks

this is my hook code:

public function doMassActions($parameters, &$object, &$action, $hookmanager)
{
	global $conf, $user, $langs;

	$error = 0; // Error counter

	/* print_r($parameters); print_r($object); echo "action: " . $action; */
	if (in_array($parameters['currentcontext'], array('banktransactionlist', 'somecontext2'))) {		// do something only for the context 'somecontext1' or 'somecontext2'
		
		require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
		$bankaccount = new Account($this->db);

		$links = $bankaccount->get_url($object->rowid);
		foreach ($links as $key => $val) {
			// Do action on each object id
			require_once DOL_DOCUMENT_ROOT.'/custom/mymodule/class/myobject.class.php';
			$myobject= new MyObject($this->db);

			if ($links[$key]['type'] == 'myobject') {
				$myobject->id = $links[$key]['url_id'];
				$myobject->ref = $links[$key]['url_id'];
				print $myobject->getNomUrl(2).' ';
			}
		}
	}



	if (!$error) {
		$this->results = array('myreturn' => 999);
		$this->resprints = 'Error';
		return 0; // or return 1 to replace standard code
	} else {
		$this->errors[] = 'Error message';
		return -1;
	}
}