• SFDC User2382943
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
There are a lot of great resources detailing how to customize the lead conversion process. One thing that I have not been able to find is the ability to redirect to the to the screen to allow the user to attach the lead to an existing contact, assuming they have already selected to attach to an existing account. Is this functionality possible? 
I have a custom object that I would like to create and save an opportunity from with a few of the fields. I think my problem is that I'm including contact lookup fields? I'm getting a save error that says "Illegal assignment from Id to SOBJECT:User"

How can I make this trigger work?

trigger meeting on MD_Meeting__c (after update) {
    List <Opportunity> oppToInsert = new List <Opportunity> ();
    for (MD_Meeting__c m : Trigger.new) {
        if (m.SD_Action__c=='Generate Opportunity') {   
        Opportunity o = new Opportunity ();  
        o.Owner = m.Sales_Director__c;
        o.Market_Developer__c = m.Market_Developer__c;
        o.Account = m.Account__c;
        o.Type = 'Sales - New Business';
    o.CloseDate = System.Today()+150;
    o.MeetingLookup__c = m.Name;
        o.add(o);
        }//end if
    }//end for o
    try {
        insert oppToInsert;
    } catch (system.Dmlexception e) {
        system.debug (e);
    }
}
I have a custom object that I would like to create and save an opportunity from with a few of the fields. I think my problem is that I'm including contact lookup fields? I'm getting a save error that says "Illegal assignment from Id to SOBJECT:User"

How can I make this trigger work?

trigger meeting on MD_Meeting__c (after update) {
    List <Opportunity> oppToInsert = new List <Opportunity> ();
    for (MD_Meeting__c m : Trigger.new) {
        if (m.SD_Action__c=='Generate Opportunity') {   
        Opportunity o = new Opportunity ();  
        o.Owner = m.Sales_Director__c;
        o.Market_Developer__c = m.Market_Developer__c;
        o.Account = m.Account__c;
        o.Type = 'Sales - New Business';
    o.CloseDate = System.Today()+150;
    o.MeetingLookup__c = m.Name;
        o.add(o);
        }//end if
    }//end for o
    try {
        insert oppToInsert;
    } catch (system.Dmlexception e) {
        system.debug (e);
    }
}