+ Start a Discussion

Excute logic in before and after trigger during Record Update


I have a field picklist with values 
Value: ABC, CDB.

If the value ABC is clicked and clcked on Save button, i want to execute a trigger which will execute some logic

1) How can i execute the usecase ?
Detect =>the change of picklist to ABC, and click of Save button
Action 1=> i want to change a Technical field value (can i do it in is before)
Action 2=>call a API (shold i call in future method ?)

thank you for suggestion 
Best Answer chosen by Sandrine
Sunil RathoreSunil Rathore
Hi Sandrine,

With regards to your question:
Action 1=> I want to change a Technical field value (can I do it in is before)
Yes, any change/update on the same object can be made from before trigger event without using DML statement. 

Action 2=> call an API (should I call in a future method ?)
Yes, it is mandatory
Please refer the below link for more details 

Hope this will help you. If does then mark it as the best answer so it can also help others in the future.

Many Thanks,
Sunil Rathore