Auto-Populate QuickCreate-Form

Hey guys,

I’m not quite sure, if “General Discussion” is the right category for this topic, but here is, what my question is:

When creating a new Opportunity by clicking the “Create”-Button of the opportunity-subpanel of a contact the address and some other information (like phone number and email address) should automatically be taken over from the contact and filled into the Opportunity-Form.
Additionally I’d like to have the assigned user of the contact taken over to the assigned user of the opportunity, instead of filling in the current user.
Is this does anyone know how this can be accomplished?

Greetings

I believe this post should help.

Thanks,

Will.

Thanks for your reply, Will, but I must admit, I couldn’t adapt their solution to work for me.

I tried editing \modules\Opportunities\Opportunities.php like so (just for testing):
in the function Opportunity() I added

$this->name = $_REQUEST['contact_name'];

this worked perfectly fine. But i also tried to alter the “Assigned To”-field, but none of my changes did have any effect…
I think I might need some further guiding…

Greetings

OK, here is how i got it to work:

  1. Redirect the Create-Button of the Subpanel like described in the post linked above.
  2. insert the following into the function display() inside \custom\modules\opportunities\views\view.edit.php:
$sql = "SELECT assigned_user_id FROM contacts WHERE id='{$_REQUEST['contact_id']}' AND deleted=0";
$this->bean->assigned_user_id = $GLOBALS['db']->getOne($sql);

This Guide has been really helpful solving this issue.
Maybe anybody else finds this useful, too.

Greetings

btw: can I only edit my most recent post?