You need to sign in to do that
Don't have an account?
TaskRelation timing question...
Hello.
I have a trigger which, on Task insert/update, iterates over all Tasks for a given Contact, determines which are Phone calls, finds the most recent one, and sets the activity date of that Task on the Contact. Easy.
Then the client enabled the functionality that allows them to relate multiple Contacts with a Task. So i updated the Trigger to incorporate the TaskRelation object. But i'm seeing some odd behavior.
On the New Task screen, I associate two Contacts and save. The first thing my trigger does is query the TaskRelation table for that Task - but the debug log only shows one result. If i query the table manually (same query via eclipse or whatever), i see two results. I'm guessing this is a result of my trigger running before the other TaskRelation record is created? Has anyone else seen this? As far as i know, my options are limited - i can make it a @future call or a batch process...Anything else?
Thanks
Chris
I'm seeing the same odd behavior. However EventRelations works fine and are available in after Event update trigger
Any answer to this issue?
i'm afraid i never found a suitable answer. i moved the code into a scheduled batch process.
best of luck to you
chris