When should I use Apex?

Telegram logo Join our Telegram Channel
When to use apex

You might be having questions like Salesforce already provides powerful automation tools like Flows, Approval processes, Validation Rules, Formula field, (old tools like Process Builder, Workflows), etc. As there are some limitations to these tools, so you need to use apex when these tools are not sufficient.

Apex might seem like a step behind in this era of Flows, but you can’t deny the flexibility and power it provides. Remember every requirement can’t be achieved just by using the declarative tools, for example, flow can’t do batch operations on data. In those scenarios, you need to use the apex.

You can use apex in these scenarios:

  • When you want to implement a complex business requirement that is not supported by Flows.
  • You want to perform some complex validations on records for example preventing a record deletion based on the field value of the record.
  • When you want to create custom web services.
  • When you want to call external APIs.
  • When you want to create email services.
  • When you want to perform batch operations on a large amount of data.
  • Overriding the standard behavior of the Salesforce objects, and pages.
  • When you want to create custom user interfaces using Lightning components or Visualforce pages.
  • When you want to build customer-specific custom functionality on top of the Salesforce platform.
  • When you want to create helper utilities to extend flow and invoke apex from flows.


Next >> Data Types in Apex


References

No comments :
Post a Comment

Hi there, comments on this site are moderated, you might need to wait until your comment is published. Spam and promotions will be deleted. Sorry for the inconvenience but we have moderated the comments for the safety of this website users. If you have any concern, or if you are not able to comment for some reason, email us at rahul@forcetrails.com