문제

On force.com, how are workflows different from triggers? It seems to me that the workflows are basically another way of creating a trigger and defining what happens when that trigger is triggered. Have I missed something? Is it completely different to triggers or is it just a friendlier way of entering triggers?

도움이 되었습니까?

해결책

Yes - workflows are (pretty much) just a friendlier way of entering triggers. They allow the 'button-click admin' to define actions to be performed in response to events in the database. You can replicate any workflow by writing trigger code, but certainly not vice versa.

The general consensus in the Salesforce community is that, if you can achieve the same end through configuration or code, it's better to go the configuration route.

This post on the Force.com discussion board has a little more detail on when you might want to go ahead and code a trigger.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top