Create Contact(s) & Task(s) for specific Accounts using Auto launched Flow #inSalesforce
Suppose create a auto launched flow
1.Get Records Element: getAccount
object - Account
criteria - Annual Revenue > 10000
all records,
2.Decision Element - for Null Check
criteria as getAccount isnull False
3.Loop Element: loopThrough1
getAccount - collection variable
4.Assignment
Create new variable > contactVar , type - record,
Assign > contactVar.AccountId equals loopThrough.AccountId and set lastname equals loopThrough1.Name+' Contact'
Create new variable > collectorVarContact , datatype - record , Allow multiple values , object - Contact
Assign > collectorVarContact Add loopThrough1
5.Create Element
Create Contact, create multiple, collectorVarContact
6.Loop Element: loopThrough2
collection variable - collectorVarContact
7.Assignment
variable varTask, record, Task
varTask.AssignedId equals User.id
varTask.Status equals 'Not Started'
varTask.Subject equals 'Sample Task Created'
varTask.Priority equals 'Low'
varTask.WhoId equals loopThrough2currentItem.Id
Assign - collectorVarTask ADD varTask
8. Create Record-
Create Task, multiple , collection - collectorVarTask
9. Send Email to currentuser when no such Accounts found
10. Connect all Elements, Debug and Activate flow
Comments
Post a Comment