Skip to main content

Hii all

I am building a screen flow o Case and using Data Table to display the Account's related Financial Records.

I want to select some records and creat a junction records between every selected record to the Case.

How to do that?

3 respuestas
  1. 24 abr 2023, 4:23

    Hi @Michael Cohen - 

     

    1) Create a screen flow from a case record. Use the recordId Record variable available for input to capture the details of the case record

    https://salesforce-flowsome.com/flow-how-to-use-record-id/

     

    2) Use get records to query for the Financial Accounts of the related AccountId on the case object. Select to retrieve all records and use the automatically store all fields

     

    3)Use a screen with data table to use the above collection and necessary columns to show on a data table. Use Multiple rows selection mode and choose minimum and maximum selection as per your requirement.

     

    4) Create a Single record variable for your junction object and a record collection for your junction object.

     

    5)once the user has selected, these will be stored in the {!DataTable.selectedRows} record collection. 

    You might need to loop through this selected rows and use values from the case and the current row from data table selection to populate the values of junction object using assignment and the junction object single variable created in previous step.

     

    https://salesforce-flowsome.com/flow-how-to-use-data-table/

    https://www.asagarwal.com/step-by-step-guide-to-using-data-table-in-salesforce-flow/

     

    You need to keep adding the single record variable to the Junction object record collection for every item in the loop and after the last item, use Create record and use this collection to create the junction objects in one go.

0/9000