function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Not creating Opportunity Contact Role record


Hello All,


I have two account lookup fields in Opportunity. One is Standard lookup field and another is custom lookup field.  If i create an Opportunity from Contact page, I just want to prepoluate custom Account lookup field instead of standard account field on Opportunity.


I created a custom button with following URL and replaced New button of Opportunity. it's working fine as i expected.

I have a trigger(after insert,update) on Opportunity that will update the standard Acount lookup field.




Once I create an Opportunity from contact , it should create Contact Role record and it wil be shown in Opportunity Contact role related list.


In my case, it 's not creating contact role record. I am missing something. can anyone please assist me on this.


Thanks in advance.