This topic is locked
[SOLVED]

 Link to a related record in SugarCRM?

9/3/2010 9:10:45 PM
PHPRunner General questions
K
kenlyle author

If I have a database where the Fullname and/or emails match with SugarCRM contacts', or maybe I even bring the SugarCRM IDs, the 32 byte or whatever IDs, across to my database....
Anyone know how I can make the person's name in my app clickable, and linked to the corresponding record in Sugar?

Sergey Kornilov admin 9/3/2010

Ken,
I guess you can set 'View as' type of Fullname field to 'Custom' and use the following code:



$value = "<a href='URL to View page in SugarCRM'>" . $value . "</a>";


Details depend on how URLs are formed in SugarCRM.

K
kenlyle author 9/4/2010

Yeah, that's a great start. But there will be an authentication requirement. I think it's REST the API for passing a request like that in a URL.
Looking a little closer, if the user is already logged in to Sugar in the same browser instance, then a URL like:
http://mysugarsite.com/sugarpath/index.php?module=Contacts&action=DetailView&record=e9de6fa1-50a9-18c5-95b8-4bb5c09e76f4 will open the record.
So, if you have a fairly small and static list of Contacts in your database, it may be just as well to just bring Sugar IDs across once with a query (match on email, perhaps), and then just build the URL like you suggest. I think that's "agile", "the simplest thing that could possibly work", and I'll be looking for the next level of integration.
Thanks, Sergey.