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
Steven LaycockSteven Laycock 

When is code the only choice and declarative won’t handle then issues?

I realize the benefits of delaritive but where does it stop and have to let code take over?.
ANUTEJANUTEJ (Salesforce Developers) 
Hi Steven,

There is no hard and fast rule as such but it is generally prefered to make the functionality declaratively and in case if it is not possible to do it declaratively then we would generally go for programmatic approach.

Also in case if you want to extend the functionality like lets say on clicking save button you would like to do an additional functionality which could not be possible declaratively then we can go for a programmatic approach.

I hope I was able to address your question in case if this came in handy can you please choose this as best answer so that it can be used by others in the future.

Regards,
Anutej
 
Steven LaycockSteven Laycock
Thank you it was very helpful.
ANUTEJANUTEJ (Salesforce Developers) 
Glad I was able to help you out in addressing your question, Steven.
Pawel BorysPawel Borys
One more thing worth mentioning is that when the org is growing you can hit a point where declarative solutions are not efficient enough. In one of my projects we had to migrate a bunch of Process Builders to triggers to stop hitting transaction CPU time limit on our busiest objects' triggers.

Of course this also depends on available resources. We could afford to do that because we had a bunch of developers who could implement and support it.