0

Hello all I have an issue with a screen flow. In the print, you can see the components numbered 1 to 5. The issue is in component (5), where it's only adding one single Id, the last one, even if it allow multiple values

Account - Label = "Loja" Checklist__c.Account__c - Lookup for Parent Account Checklist_Produto__c.Checklist__c - Mater detail field for Parent Checklist_Produto__c.Product__c - Lookup for Product2 Product2

First the datamodel: Checklist_Produto__c is a joint object, between Object Checklist_Produto__c and product

and Checklist__c another joint table between Account and Checklist_Produto__c

I have admin profile, Full access to all objects and records, and the owner of the account, and Checkist__c objects

in the Salesforce UI, it all works fine. Now this is the defined screenflow:

Screen flow with number references

(1) screen 1: has Lookup component to select Account Lookup: API name: lkpStore field API name: AccountId Object API name: Contact

enter image description here

(2) Find related Checklists

the filter set is: field: Account__c (maps to Account.id, or in the print, "Loja") Equals {!lkpStore.recordId}

enter image description here

(3) Store has related Checklist? Outcome "Has related Checklist"

  • Resource {!Find_related_Checklists} is Null value = {!$GlobalConstant.False}

enter image description here

(4) Looping Checklists, collection variable: {!Find_related_Checklists}

(5) Add checklistId {!CheckListIds}

checklistId = Text variable allowing multiple entries

enter image description here

This is the outcome, starting with an account, with 2 related Checklist__c, each and each of those with Checklist_Produto__c related. Also all Checklist_Produto__c have related products.

Debug:

enter image description here

(next button)

enter image description here

I can see the decision passes to "Has_related_Checklist" and does have related Checklist__c

The problem is that highligted id is the only one added. i loop them all...

enter image description here

...But in the "Add checklistId" component, that is the only one added

enter image description here

I needed all the the related ones, to find all related products.

Another issue i have, is that even with that single one, i should find the related Product2. But the flow wont even enter that component.

2
  • what happens on iteration 1-11? Commented Oct 17 at 19:40
  • it either keeps adding the same value (should not, as i think i added the element found in the iteration. And that list is a collection, or List<String>), or just adds the last one. Regardless, we abandoned the flow, and went with lwc.. Anyway, thanks for the attempt Commented Oct 28 at 9:01

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.