Create a number of records based on certain using screen flow (without using loop) #inSalesforce
Create a screen flow
Create a new resource:Account(name), variable, Account, record. i/p
display text - Are you sure to create contacts for this Account?
text - Account Name = Account.Name
number field - Contact Limit = Account.ContactLimit
text - Contact First Name
text - Contact Last Name
Assignment:
contactlimitcounterdefault
contactlimitcounter equals Account.contactLimit
DECISION:
verify the contact limit
>0: contactlimitcounter > 0
<0: * (create element down...)
Assignment:
ContactInstance
new resource -
contact, record, object: Contact
contact.firstname equals screen firstname
contact.lastname equals screen lastname
contact.Account equals Account.id
new resource: contacts, record, allow multiple, COntact object
contacts Add contact
Assignment:
Decrease the contact limit
contactlimitcounter, number, 0 decimal
contactlimitcounter subtract 1
Connect this to the decision back
*
Create:
create the contacts
multiple, contacts
Save and Activate
Place the screen flow in Account detail page
Debug and Test
Comments
Post a Comment