Skip to main content

#Flows34 utenti parlano di questo argomento

I have a flow that creates a Conversion Event record (custom object) whenever a Campaign Line (CLN) record (related custom object) is created (via the Clone button). Typically, there are multiple Conversion Events, which are auto-numbered, related to a CLN. The intention of the flow is to clone/copy over those Conversion Events from the old CLN to the new cloned CLN without the user having to recreate them.  

In the flow, I use a Get Records to pull all the Conversion Event info from the previous CLNs and then loop through all the records and use an Assignment to assign the values to the field variables and a Collection to hold all of the newly created records. However, I have one field, a picklist that is just a list of numbers 1-20, that doesn't always pull the number from the looped records and populate in the new Conversion Event record. 

Does anyone know why this would happen and how it can be fixed? I'm wondering if there is something nuanced about using numbers in a picklist that I don't know about? 

Thanks! 

 

#Flow  #Flows

3 risposte
  1. 2 ott, 05:33

     Hii Lisa,

     

    The 1–20 picklist values are not the issue. I would check the Flow’s loop or assignment

    pattern first.

    Make sure the picklist is assigned directly from Current Item from Loop to the new record variable, then add that record variable to the collection. Create the records after the loop, not inside it. Salesforce specifically recommends this pattern because the Current Item is reset on each iteration.

    Also verify that the picklist values are "Active" and available for the target "Record Type"

     (and controlling value, if it’s dependent). 

     

    Check this for references: 

     https://trailhead.salesforce.com/content/learn/modules/loops-in-flow-builder/build-a-loop

     

    https://help.salesforce.com/s/articleView?id=platform.troubleshoot_picklist_values.htm&type=5

0/9000
James K.k ha fatto una domanda in #Salesforce Platform

I’m working with a Salesforce Flow that processes a relatively large number of records, and I’m looking for ways to improve its performance and reliability. 

 

The Flow currently performs several record queries and updates during execution. As the amount of data increases

,

the Flow takes longer to complete and can sometimes approach Salesforce governor limits. 

 

What are some recommended approaches for optimizing a Flow in this situation? For example, would reducing Get Records operations, using collections more effectively, or moving some logic to Apex help? 

 

I’d appreciate any practical suggestions or best practices for designing scalable Salesforce Flows. 

 

#Salesforce Platform  #*saleforce Platform Basic* - Understand The Salesforce Architecture  #Flows  #Slack Developers  #Automation

3 risposte
  1. 29 set, 10:31

    Hi @James K.k

     

     

    The biggest win is usually reducing database operations, not just reducing Flow elements.

    I’d bulkify the Flow around collections, eliminate Get Records/DML inside loops, and query only the fields/records actually needed. If the volume or logic still pushes governor limits, I’d move that part to Apex and let Flow handle the orchestration.

0/9000

Salesforce doesn't have a good way to assign a price book to a specific account. My research indicates I can set up a flow that would do this. I am confused on how to set up the conditions need to to pull in the price book to the opportunity when it is created or updated. 

 

#Trailhead Challenges  #Flows

4 risposte
  1. 29 set, 07:08

    Hi @Stephanie Huffman

     

    Yes, you can use a Record-Triggered Flow on Opportunity to assign the Price Book. Trigger it when the Opportunity is created or its Account changes. Use Get Records to find the Price Book related to the Account, then update the Opportunity’s `Pricebook2Id`. If multiple Price Books are used, store the Account-to-Price Book mapping in a custom field or object. This will automatically assign the correct Price Book. 

    If this answer is Helpful for You Please Mark as Best Answer. 

     

0/9000

I have a screen flow that I'd like users to be able to access two different ways: from a field on the Opportunity Product object, as well as a Detail Page Button. What's paramount is where the screen flow returns at its end: I need it to end on a view of the product related list on the related Opportunity record. I got it to work successfully on the field version. Here's my formula field:  

 

HYPERLINK("/flow/Opportunity_Product_Screen_Flow_Clone_Opportunity_Product" &"?recordId=" &Id &"&retURL=/lightning/r/Opportunity/" & OpportunityId & "/related/OpportunityLineItems/view", 

"CLONE", 

"_self" 

) 

 

But for the life of me, I can't get the Button version of the URL to go back to the Product related list. I figured out that I can't reference the Opportunity Id via merge field in this scenario, so I created a formula field called Opportunity_Id__c, which just utilizes a CASESAFEID version of the Opportunity Id.  

 

In order to save time, here is a list of the various versions I've tried that DON'T work:  

 

/flow/Opportunity_Product_Screen_Flow_Clone_Opportunity_Product?recordId={!

OpportunityLineItem.Id}&retURL=/{!OpportunityLineItem.Id

} 

 

/flow/Opportunity_Product_Screen_Flow_Clone_Opportunity_Product?recordId={!

OpportunityLineItem.Id

}&retURL=/lightning/r/Opportunity/&OpportunityId&/related/OpportunityLineItems/view 

 

/flow/Opportunity_Product_Screen_Flow_Clone_Opportunity_Product?recordId={!

OpportunityLineItem.Id

}&retURL=/lightning/r/Opportunity/OpportunityLineItem.Opportunity_Id__c/related/OpportunityLineItems/view 

 

/flow/Opportunity_Product_Screen_Flow_Clone_Opportunity_Product?recordId={!

OpportunityLineItem.Id}&retURL=/lightning/r/Opportunity/{!Opportunity.Id

}/related/OpportunityLineItems/view 

 

/flow/Opportunity_Product_Screen_Flow_Clone_Opportunity_Product?recordId={!

OpportunityLineItem.Id

}&retURL=/lightning/r/Opportunity/{!OpportunityLineItem.Opportunity_Id__c}/related/OpportunityLineItems/view 

 

/flow/Opportunity_Product_Screen_Flow_Clone_Opportunity_Product?recordId={!

OpportunityLineItem.Id

}&retURL=/lightning/r/Opportunity/&OpportunityLineItem.Opportunity_Id__c&/related/OpportunityLineItems/view 

 

/flow/Opportunity_Product_Screen_Flow_Clone_Opportunity_Product?recordId={!

OpportunityLineItem.Id}&retURL=/lightning/r/OpportunityLineItem.Id

} 

 

/flow/Opportunity_Product_Screen_Flow_Clone_Opportunity_Product?recordId={!

OpportunityLineItem.Id

}&retURL=/lightning/r/{!OpportunityLineItem.Opportunity_Id__c}/related/OpportunityLineItems/view 

 

/flow/Opportunity_Product_Screen_Flow_Clone_Opportunity_Product?recordId={!

OpportunityLineItem.Id

}&retURL=/lightning/r/&OpportunityLineItem.Opportunity_Id__c&/related/OpportunityLineItems/view 

 

 

Anyone have any thoughts, tips, or suggestions?  

 

#Flow  #Flows  #Screen Flow  #Formulas

7 risposte
  1. 21 set, 14:54

    Hi @Deepak Sachdeva

    , 

     

    Thank you for the suggestion. I tried that, exactly as you laid out, but it still did not work.  

     

    I am happy to announce, however, that I spoke with Salesforce support on Friday and they did get it to work. Confusingly, it was one of the options I had tried before, which is in the list of my original post.  

     

    This is the URL that worked:  

     

    /flow/Opportunity_Product_Screen_Flow_Clone_Opportunity_Product?recordId={!

    OpportunityLineItem.Id

    }&retURL=/lightning/r/Opportunity/{!OpportunityLineItem.Opportunity_Id__c}/related/OpportunityLineItems/view 

0/9000

I am experiencing a synchronization delay when trying to link a newly built flow to a subagent action. After creating the flow, I go to add a new action and select Flow as the Reference Action Type. However, the flow does not immediately appear in the Reference Action dropdown list and takes several minutes to become visible.

Could you please advise if this is expected caching behavior? If so, what is the standard propagation time I should expect? 

 

#Agentforce  #Flows

3 risposte
  1. Khyati Mehta (InfinySkills) Forum Ambassador
    12 set, 16:26

    Hello Amit, 

     

    Yes, this can happen due to backend synchronization/caching. Newly created Flows may take a few minutes before they become available in the Reference Action dropdown for a subagent. It’s not usually an issue with the Flow itself. There doesn’t seem to be a fixed guaranteed propagation time, but in practice, waiting a few minutes and refreshing/reopening the action configuration usually makes the Flow appear. Hope this helps!

0/9000
Mario Santellan (HEB Grocery) ha fatto una domanda in #Flow

Hi everyone! 

 

I am trying to configure a new screenflow to have it's Uploaded File's name mapped into a text field.  I tried creating a Variable (Text-Collection) and added an Update Records element after the screen in an attempt to map it, but I can't get it right.   

 

What am I doing wrong here? 

 

Help with mapping attachment names into a field

 

image.png

 

image.png

 

 

 

 

 

#Flow  #Screen Flow  #Flows

12 risposte
  1. 8 set, 03:09

    @Mario Santellan

      

    your flow is basically right — the only broken piece is the GetFileName filter value. In that resource picker you're currently on 'Related Record ID', which is the record you attached the files to, not the uploaded file. Instead pick the Upload File component's 'Content Document IDs' output (Upload File > Content Document IDs) — that's the list of the uploaded files' Ids. Also change the operator from Equals to In, since that output is a collection: the condition should read Content Document ID In → Upload File > Content Document IDs. Equals against a collection is exactly why nothing matched. Your Title mapping is already right — Title lives on the ContentDocument record, which is why 'Content Document from GetFileName > Title' works in AddAttachmentName (Title = file name without the extension; add FileExtension if you need the .pdf/.docx part). On multiples: with 'Only the first record' selected you'll capture just the first file's name. If a partner uploads 2+ files and you want them all, switch GetFileName to 'All records', add a Loop over it, and in an Assignment append each 'Loop > Title' (plus a comma) into a Text variable, then map that variable into File Name. If one name is enough, first-record is perfect as-is. Give that a try — it should populate.

0/9000

hello 

i can't access   this  suberbag   trailhead  page 

 

Advanced Flow for Agentforce Superbadge Trailhead page

. 

tha,ks  for    help 

 

#Flows

4 risposte
  1. Ajaypreet Singh Saini (Grantbook) Forum Ambassador
    8 set, 17:28
0/9000

Hello, I would be interested in improving my Salesforce programmatic  and declarative skills by lending my services  pro bono (no money) . I have past experience 

working as a  Salesforce developer creating and maintaining automation for a couple of non-profit companies (Awana International and CBN) and would like to help lend my skills  and support in any way that I can.   Thanks much. 

 

#Nonprofit User Groups  #Salesforce Developer  #Flows

0/9000

A Flow calls an Invocable Apex method, and Apex updates the same record that triggered the Flow. 

Will the Flow run again?

  

 

#Flows

4 risposte
  1. 2 set, 12:25

    No, the Flow itself won't automatically restart just because Apex updates the same record — Salesforce doesn't loop back into the currently running Flow from within its own transaction. 

    But watch out for this:

     

    If that Apex update happens to match the entry criteria of a

    Record-Triggered Flow (even the same one), Salesforce can fire a new Flow execution — because to the platform, it's just another DML update on the record, not "the same Flow running again." 

    One-line takeaway:

     

    Same Flow instance won't re-run recursively, but a fresh Flow trigger can fire on that DML — so it's still safer to add a guard condition (like checking if the specific field actually changed) if you want to avoid unintended re-entry. 

0/9000