-
Notifications
You must be signed in to change notification settings - Fork 78
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
CustomObjectTranslations and CustomFieldTranslations are not pulled correctly #2124
Comments
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. |
Does the problem happen if you retrieve via the CLI commands? If so, can you share the command and the output? If not, I can transfer this issue to the VSCode extensions repo |
Same error appears in the cli:
Output
|
I'm not able to replicate this. We have a sample project for translations that we use for testing here: https://github.com/salesforcecli/plugin-source/tree/main/test/nuts/customTranslationProject I sent this to a scratch org, and then retrieved it via based on that error message, do you already have a file called If so, where did that file come from? Is there anything weird about it? ex: the |
I have copied your translation setup once and divided it into 2 packages. Package A is Default and Package B contains the CustomObject-Translation. Here I have deliberately removed the translation field. This must be set up on the Org then once and then my reported bug should occur when retrieving. https://github.com/Schuchie/sfdx-translation-bug |
OK, that's replicable. Was the working before and now it's broken, or has it ever worked? |
This issue has been linked to a new work item: W-13193003 |
@mshanemc I think sometime before it worked, but I cannot define a specific date. |
@mshanemc any update on that? |
nothing yet. it's replicable, but we don't have a fix for it. |
Hey @mshanemc, The bug costs us an enormous amount of time, because we have to manually pull all translations every time. Normally the admin could also do this via the DevOps Center. |
bump |
We are also experiencing this bug as well when trying to pull changes when having a CustomFieldTranslation file locally |
Note that the behavior of CustomObjectTranslation and CustomFieldTranslation is slightly different from other parent/child decomposed metadata types like CustomObject and CustomField. CustomFieldTranslation is defined differently as a type in the server and cannot be separated from its parent, whereas CustomField can exist separated from its parent. In practice, this means that wherever a CustomObjectTranslation exists locally, all related CustomFieldTranslations will be retrieved peer to its CustomObjectTranslation. But new CustomFields that are created in the org will be written to the default package directory and not peer to its parent CustomObject if that CustomObject is in another package directory. |
@shetzel Seems like the fix introduced in |
Thanks for the confirmation @petter-eikeland ! |
@shetzel looks like its fixed. Thx! |
This issue is fixed in version 2.16.7 (Nov 8, 2023). |
Summary
The current project has 2 packages in the SFDX project json: PackageA and PackageB. Package A is marked as default package.
Package B currently contains only the object's .objectTranslation.xml. If you now retrieve the object, e.g. by right-clicking in the file (vscode), by command or Package.xml, the following error occurs. Mostly a CustomFieldTranslation is retrieved into the default, then the process is interrupted:
Steps To Reproduce:
Expected result
Retrieve all fields and update the object-translation in the folder where the object translation is already. Don't throw an error.
Actual result
One field gets pulled into the default package and following error occurs:
System Information
Which shell/terminal are you using? (e.g. bash, zsh, powershell 5, powershell 7, cmd.exe, etc.)
If you are using
sfdx
Additional information
The text was updated successfully, but these errors were encountered: