Menu
Welcome, Guest
Username: Password: Remember me

TOPIC: Get url in a bean

Get url in a bean 1 week 4 days ago #90416

  • gstjonathan
  • gstjonathan's Avatar
  • Offline
  • New Member
  • Posts: 17
  • Karma: 0
Is posible get the URL from a specifyc bean?

example in a hook:
public function helloWorld( &$bean, $event, $arguments)
	{
		echo $bean->getTheUrl();
                exit;
	}

I currently do this
echo $sugar_config['site_url']."/index.php?module=module_name&action=DetailView&record=".$bean->id;
exit;
The administrator has disabled public write access.

Get url in a bean 1 week 4 days ago #90421

  • pgr
  • pgr's Avatar
  • Offline
  • Administrator
  • Posts: 11144
  • Thank you received: 1669
  • Karma: 380
So, does this code work well for you?

What exactly are you asking, if there is a function for this already in the core code? If so, I think the answer is no, not that I know of...

My SuiteCRM In-depth blog.
Thank you for always stating your SuiteCRM version, checking your logs, reading the Docs, and searching before you ask!
Last Edit: 1 week 4 days ago by pgr.
The administrator has disabled public write access.
The following user(s) said Thank You: gstjonathan

Get url in a bean 1 week 3 days ago #90426

  • gstjonathan
  • gstjonathan's Avatar
  • Offline
  • New Member
  • Posts: 17
  • Karma: 0
Not works, this just is a question if exist something like that

$bean->getTheUrl();

thanks!
The administrator has disabled public write access.

Get url in a bean 1 week 3 days ago #90436

  • pgr
  • pgr's Avatar
  • Offline
  • Administrator
  • Posts: 11144
  • Thank you received: 1669
  • Karma: 380
I don't know of any function like that, I assume it does not exist.

I think that code you have in the "echo" statement should work well, at least for most kinds of "normal" beans.

My SuiteCRM In-depth blog.
Thank you for always stating your SuiteCRM version, checking your logs, reading the Docs, and searching before you ask!
The administrator has disabled public write access.

Get url in a bean 1 week 2 days ago #90466

  • cherub-chum
  • cherub-chum's Avatar
  • Offline
  • SuiteCRM Is My Life
  • SuiteCRM Dev
  • Posts: 333
  • Thank you received: 57
  • Karma: 16
If you want to get the URL of the Page, this is something CORE php can do for you.

$_SERVER and $_SERVER;
Everything seems impossible, until its done.

Skype : cherubchum
The administrator has disabled public write access.

Get url in a bean 1 week 5 hours ago #90495

  • ashish@outrightcrm.com
  • ashish@outrightcrm.com's Avatar
  • Offline
  • SuiteCRM Is My Life
  • CTO at outright Systems
  • Posts: 445
  • Thank you received: 52
  • Karma: 5
a URL is a php thing,
just do it this way

www.php.net/manual/en/ref.url.php
The administrator has disabled public write access.
Time to create page: 0.047 seconds
Powered by Kunena Forum