You need to sign in to do that
Don't have an account?
pearlbear
How to insert a new Activity Record?
I'm writing a trigger, which, upon certain conditions, should write a new activity record connected to the Opportunity. I'm fairly new to Salesforce and APEX, so this is stumping me. I can figure out how to create a new sObject, and write records salesforce, etc. but the Activities object seems weird and special, and I can't quite puzzle out how to do this. Even URLs are welcome.
Thanks!
You want to create an sobject of type task, and set its whatId field to the Id of the opportunity.
All Answers
You want to create an sobject of type task, and set its whatId field to the Id of the opportunity.
That was it. Perrrfect. Thanks!