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
June PowerJune Power 

trigger to create opportunity

I have two contact fields: Property_Address_from_Form__c and Loan_Needed_from_Form__c
which will be auto populated from an online survey into either my lead or my person account.

I need a trigger to create an opportunity associated with that lead/account when one or both of these fields are created.
opportunity to also show both of those fields.

opportunity close date = today()+45
opportunity stage = pre-qual
Cloud_forceCloud_force
you will have to write a trigger on contact/account,

ex-

trigger mytrigger on account(after insert,after update){

if(yourfield != null){
opportunity op = new opportunity(
field__c = ,
fields2=''
)
insert op
}

}

thanks,
yvg.
http://www.forcexplore.com/2014/01/salesforce-interview-questions-part-i.html