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
Mdex Centre-VilleMdex Centre-Ville 

Start trigger (Update field) After and not before is possible ?

Hi,

I have a question for you.

I have a little difficulty with execution action order.  I would like that when I create an event on google calendar, the trigger automaticcally create a title for this event.  
The problem here is that plugin, like Groove or Cirrus, use two different way to send data.  I know nothing about that but I can guess what happen.

So, Custom field from the plugin are sent first
My trigger try to use NameId, and 3 custom field to create the title
The plugin send data from google calendar (With the invitee email adress that will find the Name ID)


So, at the end, My title is made but only with the custom field content, The name is missing because this information arrived from google after the trigger.

My question is that if it's possible to make the trigger start after that  the WhoId  is addes to the event.  For now, my trigger has "before insert" and "before update"    the solution should be to put after insert and after update but .. apparently, for field update action it's only possible to put before.

So my question is just if it's possible to ask to the trigger to do is action after that the WhoID arrived.


thx a lot for your help.
Himanshu ParasharHimanshu Parashar

Hi,

I am not sure whether it will 100% will work on not but you can try following thing.

1. Create a dummy field on Task
2. Create a workflow rule.
3. set criteria Whoid!=null
4. Update dummy field and check Re-evaluate Workflow Rules after Field Change checkbox

User-added image


Thanks,
Himanshu
Salesforce Certified Developer | Administrator | Service Cloud Consultant

P.S. If my answer helps you to solve your problem please mark it as best answer. It will help other to find best answer.

Mdex Centre-VilleMdex Centre-Ville
Hi.

Thx. but actually it's not working. all actions happen before google send WhoId Informations.  I'm very surprised about that. the only way is if, after, I update my appointment on google cal. In this case, everything is working well because the WhoID is already here. It's like when google send data the first time it's not counted as update and no re-evaluation is made
Himanshu ParasharHimanshu Parashar
can you try future call out ?
Mdex Centre-VilleMdex Centre-Ville
Future call out? Is it possible (and is it a good idea) to say to the trigger to always start but only after WhoId is not empty? I tried many solutions actually but always whoId is given by google after all rules are made. I though that the trigger will restart after that any workflow works (i checked the action order files) but ... it seems that its not the case here. its like google send this data after the event creation (with all triggers and workflow) are closed. Envoyé depuis mon appareil Android.