What is the difference between Workflows and Process Builder

It is a automatic action in salesforce. Whenever DML(Insert,Update, delete) operation on object.

We can call a Apex Class from Process Builder with @InvocableMethod Annotation.

The process builder is advance version of workflow rule. It performing automatic through action when record is created or edited. We can add Invoke apex to create a record, we can send outbound (XML) message through workflow rule but can't send outbound message through process builder. And also we can not delete a record using process builder. If we call a apex method, we need to add a Annotation "@InvocableMethod" at the top of the apex method. If I defined a annotation "@InvocableMethod" to the method, those classes can be listed in a process builder.

Public class DeleteUnacceptedQuotes{
@Invocablemethod
public static void QuoteDelete(List OpportunityIds){
List Quotes = [Select Id From Quote Where oppourunity.Id IN:OpportunityIds AND status != 'accepted'];
delete Quotes;
}
}


Process Builder  Workflow
Email Alert Email Alert
Update Field Update Field
Create Task Create Task
Submit for approval Outbound Message
Update any related record
Call apex methods
Post to Chatter
Invoke a process from another proces
Launch a flow



To know more live demo source code in Salesforce lightning, Trigger, Visualforce & LWC, Use this link..



What is the difference between Workflows and Process Builder What is the difference between Workflows and Process Builder Reviewed by Admin on 4:14 AM Rating: 5

1 comment:

header banner -- www.w3web.net



Powered by Blogger.