anusha(salesforce developer)

Thursday 2 February 2017

THE PROS & CONS of APEX,WORKFLOW RULES,VISUAL WORKFLOW,LIGHTNING PROCESS BUILDER


APEX
is really good at handling complicated logic and lots and lots of records. When you’re dealing thousands, hundred of thousands, millions of records – your looking at using APEX. You can use APEX for more simple use cases, but then that takes the flexibility away from the Admin. Most administrators do not know how to code in APEX. The major “con” for APEX is the requirement of needing an APEX developer. This also means there’s a time component. If you need a “quick change,” you’re depending on the developer’s schedule. The developer needs to update the code and test class. Then you’ll need to functionally test it and deploy. APEX is great for complicated and large processes, but there are often easier and more accessible methods for the smaller stuff.
WORKFLOW RULES
are fast, easy, and button-click friendly. The Workflow rule will “trigger” based on a set of criteria at which point the actions will either be immediate or based on a time-based schedule. Workflow rules can do a lot. They can update fields for the object it’s being “triggered” on and in certain circumstances update records for their parent record. Workflow rules can send out emails and create tasks. There’s also the rarely used Outbound message for integration.
One downside to the Workflow Rule is organization. Each set of criteria requires a new workflow rule. This means you’ll have many workflow rules for the same workflow process. For example, you want to have similar but different actions fire based on the stage of the Opportunity. This will require 1 Workflow rule per stage. The only way to organize this is by the naming convention of the rule – which can get messy.
A second downside to workflow rules are from the management perspective. You have no way of knowing what the actions are without “drilling” into each Workflow rule. That can be quickly annoying.
The final downside is the limitation. You are limited in what records you create and update, and you don’t have access to many of new features (chatter) available.
VISUAL WORKFLOW
is more complicated for most users to learn and use regularly. Unlike Workflow Rules, you have access to many other actions. You can create nearly any record and can update nearly any record. The two downsides to Visual Workflow are the difficulty it to learn the tool and it cannot be “fired” on it’s own.
LIGHTNING PROCESS BUILDER
is the new version of Workflow Rules. You can do a lot more different types of actions – including having a Flow from Visual Workflow get called. This gives you a lot of different powers. It’s built on top of Visual Workflow so you have almost all the same power of that tool. A Process can have multiple criteria diamonds – basically the equivalent of nesting multiple Workflow Rules together on one page. You can also see all the actions for each set of criteria that will be called.
One downside of the Process Builder is you currently only have access to the records and fields the running user has. Workflow rules would let you update an “invisible” field to the user. This was great for lots of data validation and controls. With Process Builder (and Visual Workflow) the field must be visible and editable by the user in order for the tool to update the field.
There are some other downsides with the current version. The tool isn’t truly “bulkified” so managing many many records will be problematic. There are also some limits on the number of “criteria diamonds” you can have and the number of active processes per object.

3 comments:

  1. Hi There,

    Great piece on THE PROS & CONS of APEX,WORKFLOW RULES,VISUAL WORKFLOW,LIGHTNING PROCESS BUILDER , I’m a fan of the ‘flowery’ style Looking forward to more long form articles ??

    I have an hourly scheduled export using a SOQL statement that retrieves new lead records when a date is greater than xyz. This date doesn't change automatically and stays static, and if I don't change the date every day, it will continue to pull records from that initial date I entered. The problem is that it will not pull in new records unless I change the date. This has become sort of a chore to do every day.

    I look forward to see your next updates.

    Gracias,
    Preethi.

    ReplyDelete
  2. Using BOFC app admins can directly perform functions of Assignment Rules such as Bulk CREATE (IMPORT) and EXPORT multiple objects (in xls).
    Visit - Salesforce Apps

    ReplyDelete
  3. Your style is very unique compared to other folks I've read stuff from. Many thanks for posting when you have the opportunity, blog Guess I will just book mark this site. Check out our website also we are one of the Health Cloud Implementation Services . We are register salesforce consulting and ISV Partner.

    ReplyDelete