I built a custom object (Project) with an Account and Opportunity lookup then a detail button in the Opportunity object that creates a Project from it and copies some of the Opp details. I'm having success now copying date fields but not on copying values to the lookup fields. This is the line intended for that automation:

project.Account__c = "{!Opportunity.Account}"; project.Opportunity__c = "{!Opportunity.Name}"

So I'm trying to copy to the custom object the Account where the Opp is associated to as well as the Opp from which the custom Project record started from. When I tried using the button with these lines, I get a MALFORMED ID error. How should I copy them to the lookup fields in the custom object then?

  • 1
    can you post your JS?
    – Rao
    Commented Jul 24, 2014 at 15:51
  • 1
    Account__c and Opportunity__c are presumably ID fields so you will need to assign ID values such as Opportunity.Id instead of Opportunity.Name.
    – Keith C
    Commented Jul 24, 2014 at 18:13


You must log in to answer this question.

Browse other questions tagged .