Skip to main content

#Flow146 discussing

Hi everyone,

I need an architectural sanity check on a security requirement. I want to avoid hitting platform limits down the road and would appreciate some feedback on whether this can be safely achieved using Schedule-Triggered Flows or whether Scheduled Batch Apex would be required.

Context

  • We are changing the Organization-Wide Defaults (OWD) of the standard Quote object from Controlled by Parent to Private.
  • We receive an integration feed from an external system that creates or updates up to approximately 80 Quotes per Account per day. Quotes can also be created manually in Salesforce.
  • Quotes contain two custom Account lookups: Sold-To and Bill-To.
  • We have both Quotes with and without Opportunities.

Requirement

  • The Account Owner of the Sold-To Account and the Account Owner of the Bill-To Account must have Read-Only access to the related Quote.
  • When the Account Owner changes, access to the related Quotes must be updated accordingly, including removing the previous owner's access and granting access to the new owner.
  • The required access is managed through QuoteShare records with RowCause = Manual.

Architectural Question

Given the expected Quote volume and the need to automate the insertion and cleanup of QuoteShare records following Account ownership changes:

  • Is this approach feasible using a standard Schedule-Triggered Flow, or would Scheduled Batch Apex be required to ensure scalability and avoid governor limits?
  • What would be the cleanest architectural pattern for handling the cleanup and creation of Manual QuoteShare records when Account ownership changes?

Thanks for your guidance!

 

 

@Salesforce Administrators & Developers, @Salesforce Administrators and Developers, @APAC Architects, @Data Quality & Management

 

 

#Trailhead Challenges  #Salesforce Developer  #Salesforce Admin  #Salesforce  #Flow  #Apex

3 answers
  1. Sep 26, 8:40 PM

    @sakshi nagpal

    , would you still recommend using APEX instead flow if the volume of quotes is of up to 80 per day approx. in general and not per account?. 

    @Debarshi Bagchi, sorry if I ask you, I would appreciate any guidance in this sense,

0/9000

I'm struggling with a flow. I have a new product, MCP which can be added to 2 different existing products my company sells. I have created this new product and made it an option for the existing product. Our design has both the Lead Product and its options bundled under one master product.  

 

-Bundle Product 

---Lead Product 

---Add On 1 

---Add On 2 

---Add On 3 (New Add On) 

 

Only the Lead product creates a subscription object, so I want to note on the Lead Product Quote Line (so that it easily flows through to the subscription) that Add-On 3 is also on the quote. 

 

In the bundle, the Lead Product is required, but the Add Ons are not. 

 

I created a flow that says when a quote line is created and the product is Add On 3 then use the SBQQ Required By field to identify the parent. Then get all the other quote lines on the quote for which the Bundle Parent is the same and filter for the one named Lead Product. Update a field on Lead Product to say "Add On 3 present" = True. 

 

If the whole of it is added at one time, the flow works as expected. If however the quote is for a renewal and we are just looking to add only the add on, it is not updating the existing Quote Line. 

 

Steps to take: Open Existing Quote Line Editor, configure the Bundle Parent, check the new add on and save the Quote Line Editor. 

 

When you run it in the debug and identify the newly created quote line as the "run as though this was created" it works as expected in all situations. 

 

#Flow  #CPQ

1 answer
  1. Yesterday, 2:57 PM
    Interesting! If I were troubleshooting this flow, I would check failed flow interviews just to make sure it's not failing without notifying me for some reason. Then, I would try modifying the flow to run on create OR update. I'm not sure what all is happening on the backend in your instance, but if it's not triggering the flow on create, maybe it is created first and then updated to match criteria, which would not trigger your flow.
0/9000

Hi everyone,

I have a question regarding the “Create Quotes without Opportunities” feature and a potential future requirement involving Orders.

 

After enabling the “Create Quotes without Opportunities” feature, Salesforce automatically provides the QuoteAccountId field on the Quote object. For Quotes created without an Opportunity, the Account relationship is stored in QuoteAccountId, while the standard AccountId is not populated.

 

Would it be technically possible to populate the standard AccountId field with the value from QuoteAccountId

for Quotes created without an Opportunity?. 

 

The reason for considering this is that Orders will be used in the future, and the standard Account relationship may be required for the Order process.

Would populating AccountId = QuoteAccountId be a supported and recommended approach, or are there any Salesforce limitations or implications we should consider when working with Quotes without Opportunities? or any workaround?.

Thanks for your guidance! 

 

@Salesforce Administrators & Developers, @Salesforce Administrators and Developers, @APAC Architects, @Data Quality & Management

 

 

#Trailhead Challenges  #Trailhead  #Salesforce Developer  #Salesforce Admin  #Salesforce  #Flow  #Data Management  #Apex  #Sales Cloud

2 answers
  1. Sep 24, 3:17 PM

     

    Short answer: you generally cannot (and do not need to) write QuoteAccountId into the standard Quote.AccountId field. On the Quote object, AccountId is a system-derived, read-only reference that Salesforce fills from the related Opportunity's Account. It is not createable/updateable through the UI, Flow, Apex or the API, so an update like AccountId = QuoteAccountId will be rejected or ignored. For quotes created without an Opportunity, QuoteAccountId (label "Account for Quote") is the field Salesforce intends you to use as the account relationship. 

     

    For your future Order process this is already covered: Salesforce's documentation for quotes without opportunities says associating the quote to an account is optional but recommended, because an account is required to convert the quote to an order. When you create an Order from such a quote, the account comes from the quote's account (QuoteAccountId), so you don't need Quote.AccountId populated. 

     

    Practical recommendations: 

    1. Make QuoteAccountId required (validation rule, e.g. ISBLANK(OpportunityId) && ISBLANK(QuoteAccountId)) so every quote can be turned into an Order. 

    2. After enabling the feature, open Object Manager > Quote > Fields > Account for Quote and grant field-level security to your profiles/permission sets. It is hidden by default, which is why it often looks unavailable in Flow, reports and Apex. 

    3. In reports, flows, sharing logic and Apex, use one source of truth, for example a formula field BLANKVALUE(QuoteAccountId, Opportunity.AccountId), so logic works for quotes with and without an Opportunity. 

    4. If you create Orders yourself via Flow/Apex (rather than the standard Create Order action), set Order.AccountId = Quote.QuoteAccountId and Order.QuoteId = Quote.Id. 

     

    References: 

    Enable Quote Creation Without a Related Opportunity:

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

     

    Release note, Create Quotes Without a Related Opportunity:

    https://help.salesforce.com/s/articleView?id=release-notes.rn_sales_quotes_without_opportunities.htm&release=244&type=5

     

    Quote object reference:

    https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_quote.htm

     

     

    Assumption: the statement that Quote.AccountId is read-only is based on the Quote object reference field properties and commonly reported org behaviour; please confirm in a sandbox (e.g. attempt the update in a Flow or Developer Console) before designing around it.

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 answers
  1. Sep 21, 2:54 PM

    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

Hi Trailead community, this challenge is taking so long :( I need help 

The trail create flow test requires to install a package 04tKa000002OV31IAG, and open the flow "

Run This Flow Once At the Start

". The provided flow is an autolaunched flow, but for most of the tasks I need to set up trigger rules which indicates that the expected flow should be record-triggered. 

Can someone provide either the right package or a workaround to move forward. Is it feasible for me to try to create that flow from scratch? 

Create flow test - Potentially obtained the wrong package

 

 

 

 

#Trailhead Challenges  #Flow

1 answer
  1. Sep 19, 12:48 PM

    You actually have the correct managed package installed (04tKa000002OV31IAG), and the behavior you are seeing is intentional for this specific Trailhead badge. 

     

     The run this flow once at the start flow is meant to be an autolaunched setup script that populates the sample data records and testing infrastructure required for the module inside your playground.  

     

    Running that initial flow once sets the stage so that you can then create a brand new, separate record-triggered flow from scratch as instructed in the later steps of the challenge.  

     

    You do not need to convert or modify that initial autolaunched setup flow; instead, click the run button inside it to let it execute its data generation, close the window, and then click New Flow

0/9000

I just created a new flow that is a after-save record triggered flow. The flow is triggered when a new Opportunity is created. We create Opportunities 3 ways, manually, through our 3rd party donor portal, and through our app. The manually created Opportunities and the Donor Portal created Opportunities are triggering the Flow and it works correctly. But none of the Opportunities created by Zapier have triggered the Flow. Is there something in the way Zapier creates records that would cause the Flow not to recognize a new Opportunity? There is an entry criteria, but several Opportunities met it and did not trigger the flow (from Zapier only).  

 

#Flow

5 answers
  1. Sep 16, 10:39 PM

    Maybe Zapier creates and then updates the Opportunity? It might come in from Zapier at $0, then get immediately updated? Maybe try the following in a sandbox or dev org. Three possible ideas: 

    1. Can you change to update the flow to trigger when a record is created or updated? Or would that not work for your circumstance? 

    2. If you do change it to created or updated, you could select to have it run only when a record is updated to meet the condition requirements, and then make sure the requirements are even more specific. 

    3. OR, instead of doing those two things, try to remove an entry criteria at a time to see if one of the criteria seems to be causing this to happen. 

0/9000

These are the errors I am getting while completing module:

  1. Create an Agent-Ready Flow

 

Flow Name:Cancel Contact's Booking 

 

Get Updated Booking Details

The field "{" for the object "01Ig8000004VX10" doesn't exist.

The field "rowIndex" for the object "01Ig8000004VX10" doesn't exist.

The field "569c5e2c-c2ac-4975-bd1e-fdf3b32185ac" for the object "01Ig8000004VX10" doesn't exist.

The field "}" for the object "01Ig8000004VX10" doesn't exist.

The element has an invalid reference to "Booking__c.{".

The element has an invalid reference to "Booking__c.rowIndex".

The element has an invalid reference to "Booking__c.569c5e2c-c2ac-4975-bd1e-fdf3b32185ac".

The element has an invalid reference to "Booking__c.}". 

 

#Trailhead Challenges  #Flow

1 answer
  1. Eric Burté (DEVOTEAM) Forum Ambassador
    Sep 16, 8:34 PM

    Hello @Mugdha Mohindra, It seems that the issue comes from the Get Record element. Could you please provide us with a screenshot of your Get Updated Booking Details element detailed pane ?.. Make sure your filter is correctly set up, and the whole element configuration too. Eric

0/9000

Is it possible to have an email sent from Salesforce that is created from an email template in Salesforce that is sent with one or more attachments to that email. If so, where do the attachments have to live? in Salesforce Files?    Thank you!    

5 answers
  1. Jul 14, 12:15 AM

    Yes — as of the Spring '25 release, the standard Flow core action "Send Email" (not the older Email Alert action) supports attachments directly. It added an Attachment ID input parameter that accepts a ContentVersion Id (Salesforce Files), a classic Attachment Id, or a Document Id — so your files can live as Salesforce Files, classic Notes & Attachments, or a Document, and you just pass the record Id into that parameter. 

    You can also set the Email Template Id on that same Send Email action, so the flow renders the template as the body and attaches the file(s) in the same step. 

    One limit worth knowing: total email size, including attachments, is capped at 35 MB. 

    Official doc: help.salesforce.com, article id platform.flow_ref_elements_actions_sendemail.htm ("Send Email Action"). 

    Assumption: I'm assuming you're on Spring '25 or later, since attachment support on the core Send Email action is a fairly recent addition — before that release, the standard action couldn't attach files at all, and people had to fall back to an invocable Apex action using Messaging.SingleEmailMessage with setEntityAttachments()/setFileAttachments() instead. If you're on an older release, let me know and I can point you to that Apex-based workaround. 

0/9000

I have written a flow that calculates a new value and stores it back on that same record. I would like to trigger this from a button and have that working, but not quite like I want. The flow works correctly, but after it runs, I get a full screen message saying "Your Flow Finished" (see below). There is no way that I have found to get rid of this. I don't mind the message but need a "Continue" button or something to take the user back to their original record page. I've tried all the button options and they all behave exactly the same. Is this just the way it is, or is there a way to get past this. My preference would be a small pop-up box with a button to close that pop-up and take the user back to the original record. Is this possible?   

 

Salesforce button not opening flow in new window

 

 

 

#Flow  #Custom Buttons

1 answer
0/9000