Open nek4life opened 2 years ago
I had this problem, my advice is go the easy way and delete the list view and remove the bad field
@filipecarvalho15 thanks for letting me know you ran into the same thing. I have tried removing the specific fields, but then ran into more errors. I will try removing the entire list view and see if the deployment will continue.
Deleting:
<columns>ACCOUNT.RECORDTYPE</columns>
<columns>ACCOUNT.TYPE</columns>
src/sfdc/base/main/default/objects/Contact/listViews/Non_B2C_Commerce_Customer_Profiles.listView-meta.xml
and deleting
<lookupPhoneDialogsAdditionalFields>CONTACT.PHONE6</lookupPhoneDialogsAdditionalFields>
src/sfdc/base/main/default/objects/Contact/Contact.object-meta.xml
Allowed the base metadata to deploy.
I now get an error with the PersonAccount metadata
[
{
"stack": "DeployFailed: Deploy failed.\n at /Users/choinierec/projects/b2c-crm-sync/node_modules/salesforce-alm/dist/lib/source/sourceApiCommand.js:71:31\n at async SourceDeployCommand.execLegacyCommand (/Users/choinierec/projects/b2c-crm-sync/node_modules/salesforce-alm/dist/ToolbeltCommand.js:149:29)\n at async SourceDeployCommand.run (/Users/choinierec/projects/b2c-crm-sync/node_modules/salesforce-alm/dist/commands/force/source/deploy.js:32:16)\n at async SourceDeployCommand._run (/Users/choinierec/projects/b2c-crm-sync/node_modules/@salesforce/command/lib/sfdxCommand.js:81:40)",
"message": "Deploy failed.",
"name": "DeployFailed",
"actions": [
"Check the order of your dependencies and ensure all metadata is included."
],
"exitCode": 1,
"columns": [
{
"key": "problemType",
"label": "TYPE"
},
{
"key": "filePath",
"label": "PROJECT PATH"
},
{
"key": "error",
"label": "PROBLEM"
}
],
"data": [
{
"columnNumber": "18",
"lineNumber": "268",
"error": "In field: RecordType - no RecordType named PersonAccount.PersonAccount found (268:18)",
"fullName": "Account.B2C_Commerce_Customer_Profiles",
"type": "ListView",
"filePath": "src/sfdc/base/main/default/objects/Account/listViews/B2C_Commerce_Customer_Profiles.listView-meta.xml",
"problemType": "Error",
"height": 1
},
{
"columnNumber": "20",
"lineNumber": "3",
"error": "You can't change a matching rule's status from Activating to Active. (3:20)",
"type": "MatchingRule",
"filePath": "N/A",
"problemType": "Error",
"height": 1
}
],
"commandName": "SourceDeployCommand",
"code": "Error"
}
]
I will try removing this file as well to see if I can deploy the person account metadata
I removed
<filters>
<field>ACCOUNT.RECORDTYPE</field>
<operation>equals</operation>
<value>PersonAccount.PersonAccount</value>
</filters>
from src/sfdc/personaccounts/main/default/objects/Account/listViews/B2C_Commerce_Customer_Profiles.listView-meta.xml
and was able to complete the deploy.
Has this project been tested against a sandbox org with person accounts enabled before? I'm wondering why these particular fields were causing issues.
Hello @nek4life , Thank you for opening an issue here.
I can see that you solved all your issues, that's great!
FYI, we are testing, for all releases, the deployment of the framework against:
Thus, to answer your question, yes this project has been tested against orgs where PersonAccounts are enabled. The issue is that you might have specific configurations/licenses on your org which makes the framework deployment breaking where it is working well on a brand new dev org/scratch org.
If you can open a pull request that removes the extra stuff not needed for a deployment, that would be awesome, otherwise, I can do it in a few weeks from now.
Thanks
@jbachelet I can certainly add a pull request. Once we have that perhaps you'd be able to tell what functionality is missing or would be broken with the missing pieces of metadata. That's my only concern. I'm not as familiar with Service Cloud development as am with Commerce so I took a very basic approach to debugging.
Please do open a PR and we will take it from there. Thanks!
It looks like I do not have permission to fork the repository. If you can update the permissions I'd be happy to help.
Charlie
From your screenshot, I can see that you do. You have to click on your Github ID shown on the screen, which will fork the repository into your personal space.
Opened #109
Describe the bug While executing the following command from the documentation https://github.com/SalesforceCommerceCloud/b2c-crm-sync#deploy-the-b2c-crm-sync-application-code-to-your-salesforce-org I receive the following error
To Reproduce Steps to reproduce the behavior:
npm run crm-sync:sf:org:deploy
Expected behavior Deploy should succeed
local environment details
Node version v14.18.3 NPM version 6.14.15 SFDX version sfdx-cli/7.132.0 darwin-x64 node-v16.13.1 Your remote environment details:
Salesforce B2C Commerce version: 22.1 compat 21.2 Salesforce Core version: ??