Re: auto relate project opportunity account

Originally Posted by
andopes Hi eddor1614.
You can create a logic_hook before_save in Projects.
This logic_hook can automatically relate the Project (Invoice) to the Account related to the Opportunity.
Best regards.
I just did this recently using SQL insert and update queries. While I was researching I found posts creating new objects and retrieving and saving the object. That seemed like a more elegant way of creating the relationship. Except I couldn't see how to retrieve a single record or save a single new record. The examples all used a for each loop and would want get data from the current record and either create a new record or update an existing record.
Do you, or anyone else
, have pointers on how to go about this?
I've reviewed this entry http://www.sugarcrm.com/wiki/index.php?title=SugarBean but it's pretty vague.
Thanks for whatever assistance you can provide. I thought this could be especially relevant for what the OP was asking and I know it's what I wanted to do.
Jerry Way
Business Process Administrator
Sugar 6.1.4 Professional
(Testing 6.1.2)
LAMP on Centos 5
PHP 5
MySQL 5
Apache 2.2
Bookmarks