-
Notifications
You must be signed in to change notification settings - Fork 79
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
Error during deployment of genAiPromptTemplate metadata to Scratch Org #3198
Comments
Hi @Eliott-Mischler - can you run the deploy command with just so I'm understanding, the I've reached out to the metadata owning team to see what's going on, this doesn't match what's documented in their metadata documentation |
Hello @WillieRuemmele,
Almost ! Here is the
|
Hi @Eliott-Mischler - I just spoke to the metadata owning team, and they confirmed that this change is expected. they also confirmed that the docs here are wrong 😦 and that the type is no longer an are your "source" (where you're retrieving from) and "target" (where deploying to) org on the same api versions? if the "source" is ahead you can retrieve in the correct format by adding the |
Hi @WillieRuemmele , Your last comment put us on the right track ! Our issue was ultimately something quite similar to what you've mentioned in the above reply. However, the --api-version flag during retrieval did not resolve it immediately. The fact of the matter was that the Sandbox Org the metadata was retrieved from was in Salesforce Spring '25, and our pipelines create a Scratch Org based on the Org Shape of our production Org, which is in Winter '25. |
Hello @Eliott-Mischler 👋 None of the versions of Shared: Update to the latest version of Salesforce CLI (docs) and confirm that you're still seeing your issue. After updating, share the full output of |
@Eliott-Mischler - glad to hear! |
Expected result
Pushing a genAiPromptTemplate retrieved from a Sandbox Org into a Scratch Org deploys successfully and causes no errors.
Actual result
The deployment to a Scratch Org fails with the following error :
force-app\main\default\genAiPromptTemplates\Profil_Consommateur_Case.genAiPromptTemplate-meta.xml Error parsing file: 'DYW2v9UcOjEUClCiohijaAqJsFnmRY0EcHEQpp0ghTg=_1' is not a valid value for the type xsd:int (3:82)
Additional information
When creating a Scratch Org to push metadata that was retrieved from a Sandbox Org, an XML difference in the metadata definition of the genAiPromptTemplate object between Sandbox & Scratch Org causes an error to occur.
Recently, the XML for the genAiPromptTemplate object changed, with a hash now being contained in the
versionIdentifier
andactiveVersion
tags. Previously,versionIdentifier
wasversionNumber
with an integer value.The Prompt Template XML is as follows :
System Information
Diagnostics
✅ pass - salesforcedx plugin isn’t installed
✅ pass - you don't have any linked plugins
✅ pass - [@salesforce/plugin-trust] can ping: https://registry.npmjs.org
✅ pass - [@salesforce/plugin-trust] can ping: https://registry.yarnpkg.com
✅ pass - [@salesforce/plugin-trust] can ping: https://registry.npmjs.org/
✅ pass - using latest or latest-rc CLI version
✅ pass - can access: https://test.salesforce.com
✅ pass - [@salesforce/plugin-deploy-retrieve] sourceApiVersion matches apiVersion
❌ warn - [@salesforce/plugin-deploy-retrieve] default target DevHub max apiVersion matches default target org max apiVersion
❌ warn - [@salesforce/plugin-deploy-retrieve] sourceApiVersion matches default target org max apiVersion
✅ pass - can access: https://appexchange.salesforce.com/services/data
✅ pass - can access: https://developer.salesforce.com/media/salesforce-cli/sf/channels/stable/sf-win32-x64-buildmanifest
✅ pass - [@salesforce/plugin-auth] CLI supports v2 crypto
✅ pass - [@salesforce/plugin-auth] CLI using stable v1 crypto
The text was updated successfully, but these errors were encountered: