Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation rule error messagess containing line breaks get "translated" with two whitespaces on deployment #3114

Closed
svenfinitiv opened this issue Nov 18, 2024 · 5 comments
Labels
owned by another team The Salesforce CLI team does not own this work but will pass on the information to the correct team. validated Version information for this issue has been validated

Comments

@svenfinitiv
Copy link

Note
Before you submit your issue, make sure that:

  • You're using the latest version of Salesforce CLI.
  • You've searched both open and closed issues for related posts.
  • You've used the doctor command to diagnose common issues.
  • You understand that GitHub Issues don't adhere to any agreement or SLA.
    • If you require immediate assistance, use official channels such as Salesforce Customer Support.

Summary

We have some validation rules with line breaks, retrieve and deploy work so far, but when a flow hits this validation and should show the error, only an empty text is displayed. The default record page shows the original error message.

Steps To Reproduce

IMPORTANT
Provide a repository that's configured to reproduce the issue. If you are unable to provide a repo, please explain why not. The more info we have from the start, the faster we can resolve your issue.
We may close your issue if you don't include proper instructions.

  • Generate a project with sf project generate or fork dreamhouse-lwc.
  • Provide detailed step-by-step instructions on how to reproduce the issue.

Given:

  • Translations enabled
  • A validation rule with a multi line error message
  • No extra tranlsation for the given error message
  • A flow using an UpdateRecord that violates the constraint of the validation rule and shows Flow.FaultMessage on an error screen
  • All is deployed to another org using sf project retrieve start and sf project deploy start

Steps:

  • Run the flow and check the output of the FaulMessage
  • Edit the record using the default edit page and check the error message

Tip

use sf doctor --create-issue to automatically fill the required information

Expected result

  • The validation rule, the flow and the translation are properly part of the source package
  • After deployment the translation workbench does not show any translation for the error message
  • Both the flow and the standard edit page show the correct error message

Actual result

  • The object translation metadata file contains whitespaces surrounding the comment with the master error message
  • The translation workbench shows two whitespaces when editing the translation of the error message
  • The translation cannot be saved
  • The flow shows two whitespaces instead of the error message

Additional information

System Information

{
  "architecture": "darwin-x64",
  "cliVersion": "@salesforce/cli/2.66.7",
  "nodeVersion": "node-v22.11.0",
  "osVersion": "Darwin 24.0.0",
  "rootPath": "/Users/svenkretschmann/.local/share/sf/client/2.66.7-5567872",
  "shell": "zsh",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 3.2.8 (core)",
    "@oclif/plugin-commands 4.1.7 (core)",
    "@oclif/plugin-help 6.2.16 (core)",
    "@oclif/plugin-not-found 3.2.25 (core)",
    "@oclif/plugin-plugins 5.4.15 (core)",
    "@oclif/plugin-search 1.2.14 (core)",
    "@oclif/plugin-update 4.6.10 (core)",
    "@oclif/plugin-version 2.2.15 (core)",
    "@oclif/plugin-warn-if-update-available 3.1.21 (core)",
    "@oclif/plugin-which 3.2.17 (core)",
    "@salesforce/cli 2.66.7 (core)",
    "apex 3.5.6 (core)",
    "api 1.3.1 (core)",
    "auth 3.6.72 (core)",
    "data 3.11.2 (core)",
    "deploy-retrieve 3.15.8 (core)",
    "info 3.4.17 (core)",
    "limits 3.3.38 (core)",
    "marketplace 1.3.4 (core)",
    "org 5.1.2 (core)",
    "packaging 1.26.4 (user) published 398 days ago (Mon Oct 16 2023) (latest is 2.9.0)",
    "schema 3.3.40 (core)",
    "settings 2.4.4 (core)",
    "signups 2.6.1 (user) published 16 days ago (Sat Nov 02 2024) (latest is 2.6.3)",
    "sobject 1.4.44 (core)",
    "telemetry 3.6.19 (core)",
    "templates 56.3.28 (core)",
    "trust 3.7.39 (core)",
    "user 3.6.2 (core)",
    "@salesforce/sfdx-plugin-lwc-test 1.2.1 (user) published 44 days ago (Fri Oct 04 2024)",
    "@salesforce/sfdx-scanner 4.7.0 (user) published 20 days ago (Tue Oct 29 2024)"
  ]
}
@svenfinitiv svenfinitiv added the investigating We're actively investigating this issue label Nov 18, 2024
Copy link

Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.

@github-actions github-actions bot added the validated Version information for this issue has been validated label Nov 18, 2024
@WillieRuemmele
Copy link
Member

hi @svenfinitiv - is this an error in the org, or with the CLI? It sounds like you're able to deploy these translations (or lack of) and error message files ok, but when they're seen in the org, in a flow, they're not displayed correctly?

If that's true, what is the difference between your local translation file, and what is written by a project retrieve start of that file?

@svenfinitiv
Copy link
Author

svenfinitiv commented Nov 21, 2024

Hi @WillieRuemmele,

there is no issue with the CLI per se, as we can retrieve and deploy the "empty" translations, but when using these in the org, the symptoms occur.

Regarding the differences:

When retrieving from the source sandbox, we get this result, take note of the line breaks before and after the comment:

    <validationRules>
        <errorMessage>
            <!-- This is a multiline error message
The seconde line includes some details. -->
        </errorMessage>
        <name>RequireImportanFieldToBeSet</name>
    </validationRules>

After deploying to the target sandbox and reretrieving from there, we get this result:

    <validationRules>
        <errorMessage></errorMessage>
        <name>RequireImportanFieldToBeSet</name>
    </validationRules>

@WillieRuemmele
Copy link
Member

@svenfinitiv - I would suggest raising a case directly with Salesforce

@WillieRuemmele WillieRuemmele added owned by another team The Salesforce CLI team does not own this work but will pass on the information to the correct team. and removed investigating We're actively investigating this issue labels Nov 21, 2024
Copy link

We have determined that the issue you reported exists in code owned by another team that uses only the official support channels. To ensure that your issue is addressed, open an official Salesforce customer support ticket with a link to this issue. We encourage anyone experiencing this issue to do the same to increase the priority. We will keep this issue open for the community to collaborate on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
owned by another team The Salesforce CLI team does not own this work but will pass on the information to the correct team. validated Version information for this issue has been validated
Projects
None yet
Development

No branches or pull requests

2 participants