Skip to main content

#Flow136 debatiendo

Hey there, I am doing an implementation for my client who requires service reports to be generated for their Work Order Line Items on a regular basis.

 

I have created a daily scheduled Flow that finds all completed Work Order Line Items for that day and loops through each record to create Service Report records for each of those WOLIs.

 

I am running the flow as a System Administrator user and it works fine when I debug it, but when I activate the schedule triggered flow I get the following error: "INSUFFICIENT_ACCESS_OR_READONLY: null. You can look up ExceptionCode values in the SOAP API Developer Guide.---This error occurred when the flow tried to create records:"

 

I can't access the Sharing Settings for Service Reports or Work Order Line Items but the user running the flow (who is the same as the Default Workflow User in the Process Automation Settings) is System Admin with ability to View and Modify all data in the environment.

 

Any ideas? Thanks in advance! 

4 respuestas
  1. Hoy, 0:39

    Hi Iqbal, it's been a while and that flow has since been retired, so I can't check the exact build. From memory and what's left in our org, I didn't fix it in the scheduled flow. The error only occurred in the schedule-triggered context; Debug works because it runs in your own logged-in session. Generating a Service Report renders the template into a PDF, which appears to need a real user session. A scheduled run doesn't have one, even as a System Admin with Modify All Data, so it fails with INSUFFICIENT_ACCESS_OR_READONLY: null. What worked for us was moving report creation out of the scheduled flow and into a context started by a logged-in user. We used a record-triggered flow that fires when the record is completed, and an admin-run bulk process to catch up the backlog. If you need it unattended, I'd try having the scheduled flow update a flag on the records and letting a record-triggered flow create the report. Hope that helps!

0/9000

A Record-Triggered Flow updates related records whenever an Opportunity is modified, even when unrelated fields change. How would you optimize the Flow using entry conditions, decision elements, and execution settings to improve performance and avoid unnecessary updates? 

#Trailhead Challenges #Flow

3 respuestas
  1. 14 oct, 16:03

    Hi @Durga Prasad Karnaty I would first check why the Flow is running on every Opportunity update.

    A few things I would suggest:

    1. Entry Conditions: Run the Flow only when required conditions are met.
    2. Run Settings: Use "Only when a record is updated to meet the condition requirements" where applicable.
    3. Check Field Changes: Compare $Record and $Record__Prior to identify changes.
    4. Decision Element: Continue only when relevant fields have changed.
    5. Avoid Unnecessary Updates: Update related records only when needed.

    Best Practice: Filter records early and avoid unnecessary DML operations to improve Flow performance.

    Hope this helps!

0/9000
3 comentarios
0/9000
1 respuesta
  1. Eric Burté (DEVOTEAM) Forum Ambassador
    24 oct, 22:03

    Hello @Eduardo Vitor, make sure you have well saved and activated the last version of your flow. Try to insert again your resource in the display text if you keep facing the issue. Because, that should work like below :Hello , make sure you have well saved and activated the last version of your flow. Try to insert again your resource in the display text if you keep facing the issue.Based on this display textimage.pngEric

0/9000

When either setting up an Email Alert, Salesforce will not make my org's default no-reply email address as an option.     On an Email Action within Flow, Salesforce will not let you Save a flow if the sender is the default no-reply email address.    Why can't I select my no-reply email address as a sender within an Email Alert or Flow?   

9 respuestas
0/9000
7 comentarios
0/9000
3 comentarios
0/9000

Hi everyone! I have a Salesforce Flow that sends confirmation emails. My Email Alert, Org-Wide Email Address, and email settings are configured correctly, but email delivery is intermittent: sometimes emails arrive, sometimes they don't.

I checked the Salesforce Email Logs, and failed messages show a DKIM authentication error (550-5.7.30).

Has anyone experienced this issue? How can I fix it? I appreciate your help. 

I appreciate your help! Thank you! 

 

#Flow  #Email Deliverbility

4 respuestas
  1. 19 oct, 14:44

    Hi @Ariana Bayona,  

    Why it’s intermittent: If your Org-Wide Email Address is a Gmail or Yahoo address, Gmail’s DMARC policy tells receiving servers to reject mail with an @gmail.com From address that doesn’t come from Google’s own mail servers. Mail from Salesforce can’t be DKIM-signed for a domain you don’t own, so it gets through at some receivers and is rejected at others. A verified org-wide address only proves you own the mailbox. It doesn’t authenticate the domain. sage

    Options without buying a domain:

    1. Use the substitute-address setting (best free fix). In Setup > Deliverability, enable “Use a substitute email address for unverified domains.” Salesforce then sends from a technical address in the form email@UniqueId.sfcustomeremail.com, using its own verified domain. Keep your real address as the Reply-To so replies still reach you. Check the exact setting name and location in your org. I haven’t confirmed where it sits in the current UI. salesforcebreak
    2. Send From a domain you already have access to. If you can use an address on a work or school domain, ask whoever manages that domain’s DNS to set up a DKIM key (Setup > DKIM Keys) or add it as an Authorized Email Domain.
    3. Buy a cheap domain. It’s roughly $10/year. Both DKIM keys and Authorized Email Domains require a domain you can add DNS records to, so there’s no free route to full authentication.

    Check first: Open the failed messages in Email Logs and confirm which From address was used. Salesforce also now requires verified sending domains (from Spring ‘26, emails must come from a domain verified as belonging to your organization), so if your From is a free-mail address, this change could be part of why delivery became unreliable. If your From is not a free-mail address, tell me what it is and I’ll rework the diagnosis. salesforceben

    Sources:

    I hope you find the above information helpful. If it does, please mark it as Best Answer to help others too.

0/9000

I'm implementing a Flow approval process. and when doing reassign action the user is getting this email: 

 

null variable in Email when Approval Flow is reassigned

 

the email is built-in. I haven't created it. I can't find where this null is coming from. and there's no customization for this template. I mean I can't even find this template from setup.

And the reassign action itself doesn't contain much of a customization: 

 

image.png

 

as you can see I filled all options, even comment just to test, but still user's getting null.

Does anybody know what this null can be? 

 

 

#Flow

4 respuestas
  1. 19 oct, 12:15

    Hi @Lazizhon Ahmedov, 

     

    This appears to be a known behavior in Salesforce's standard approval email notifications. The official Salesforce documentation mentions: 

     

    “Emails sent after a reassignment may include the extra word ‘null’ in the body. You can ignore this text.” 

     

    Reference:  Salesforce Help – Approval Email Notification Behavior

     

    You can also refer to this LinkedIn post for additional context. 

     

    Hopefully, Salesforce will address this behavior in a future release to prevent the unwanted null text from appearing in approval emails and provide a cleaner user experience. 

     

    Hope this helps!

0/9000
Nizar Am ha preguntado en #Salesforce Admin

Hi everyone,

I’m building an “Off” button for managers: they pick a replacement and absence start/end dates, and the replacement should be set as their Delegated Approver (User.DelegatedApproverId) on the start date and removed on the end date.

Setup

  • Custom object Absence_Delegation__c (Delegate, Start Date, End Date), created by a Screen Flow.
  • A daily schedule-triggered Flow on that object: if Start Date = today, set DelegatedApproverId on the record’s creator; if End Date = today, clear it.

Problem

 

Debug works, but the scheduled run in the sandbox and the selected delegate user isn't added as a delegate approver on the running flow's user page. 

I also can’t use $Flow.CurrentDate in the Start element’s entry conditions to limit the flow to records starting or ending today.

What could I be missing to fix this? 

Thanks! Happy to share screenshots. 

 

#Salesforce Admin  #Salesforce  #Flow

4 respuestas
  1. 16 oct, 11:59

    @Nizar Am  From the canvas, the likely culprit is the Get Delegations element. I can't see what's inside each element, so the rest is inference until I see them. 

    1. Get Delegations looks redundant and probably breaks things 

    A schedule-triggered flow already runs once per record of Absence Delegation, and each run has that record as {!$Record}. A Get Records element right after the Start element means one of two things: 

    • It returns one record (the first match). Then the Decision and updates run against that record, not the one the interview is processing, so most records are skipped or the wrong one is used.
    • It returns a collection. Then the Decision can't compare a date on it, and anything using it is unreliable.

    Debug is more forgiving because you pick a single record, so it can look fine there and fail on the scheduled run. 

      

    Fix: delete Get Delegations. In Delegation Status

    , use {!$Record.Start_Date__c} = {!$Flow.CurrentDate} for "Start Date is Today" and {!$Record.End_Date__c} = {!$Flow.CurrentDate} for "End Date is Today". $Flow.CurrentDate works inside a Decision, just not in the Start element's entry conditions. 

     

    2. Check that the updates target the manager, not the running user

     

     

    Both Update Records elements should be on

    User

    , with a filter of Id = {!$Record.CreatedById} (or a dedicated Manager lookup, which is safer). 

     

    • Add Delegate: set DelegatedApproverId = {!$Record.Delegate__c}.
    • Remove Delegate: set DelegatedApproverId to null. Use "Set field values" and leave the value blank, or use a null/empty text variable.
    • Don't use "Use the IDs stored in a record variable" on a User from a Get. If the User comes from $User, the scheduled run lands on the Automated Process user, which matches what you saw.

     

    3. Things on the canvas worth checking

     

     

    • Start time: it's set to 11:15 today, which has already passed in your time zone (it's about 17:00 for you). Confirm in Setup → Scheduled Jobs that the job exists and shows a next run for tomorrow. Also check the flow is Active, since a saved but inactive flow won't run.
    • Failures: Setup → Paused and Failed Flow Interviews and the flow error emails will show what the last scheduled run did.
    • No fault paths: the two updates have none. Add them, since a failed User update would otherwise be silent.
    • Entry conditions: the Start element has none, so every Absence Delegation record is processed daily. That's fine at low volume. If it grows, add formula fields (Starts_Today__c, Ends_Today__c) and filter on them in the Start element.
0/9000