Flow metadata missing customErrors component

Issue #2605 open
Tony White created an issue

When retrieving a flow with Custom Error component, it is not retrieved - https://help.salesforce.com/s/articleView?id=sf.flow_ref_elements_custom_error.htm&language=en_US&type=5

ie it is missing:

    <customErrors>
        <description>This is necessary as without it, other database writes will continue (no Rollback), and no error will be displayed to the User.</description>
        <name>Generate_Error_in_UI</name>
        <label>Generate Error in UI</label>
        <locationX>1370</locationX>
        <locationY>647</locationY>
        <customErrorMessages>
            <errorMessage>An error has occurred in Flow. Please contact your Salesforce Administrator to resolve this issue. 

Error details below (this has also been recorded in ApplicationLog for your Salesforce Administrator).
{!$Flow.FaultMessage}</errorMessage>
            <isFieldError>false</isFieldError>
        </customErrorMessages>
    </customErrors>

Metadata reference:
https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_visual_workflow.htm

Comments (6)

  1. Tony White reporter

    Further investigation indicates it could be thinking I am using version 58.0, as when I try to add the tags manually and save it gives an error about using v58.0.

    Now if I can just work out why it thinks I am using v58.0, the flow metadata says 61.0, the connection manager says 61.0, the sfdx-project.json did say 58.0, but have updated now to 61.0. The error persists even after restarting the ide.

  2. Tony White reporter

    ok went back to my emails, as have had issues with flow features before and I needed to update the package.xml as well as the sfdx-project.json

  3. Scott Wells repo owner
    • changed status to open

    Tony, if I'm understanding properly, this isn't actually a bug but is rather an issue with retrieving via an older API version where those Flow component types were not yet supported, correct?

  4. Tony White reporter

    Yes correct.

    Apparently I keep forget to update the package.xml and sfdx-project.json for the project.

    Ideally it would be good if it would prompt where you open the project and it offers to update those to the current connection version.

  5. Scott Wells repo owner

    The Inconsistent API Version inspection will do that, but only for the open file(s) and not for those out of view. So if your package.xml and/or sfdx-project.json file is open and the inspection is configured to use the connection API version as the canonical version, it will tell you that things are out-of-sync.

  6. Log in to comment