Unsupported custom field type conversion
Detection
- RegExp:
Error (.*) Unsupported custom field type conversion attempted
Examples
Error Account.Code__c Unsupported custom field type conversion attempted.
Resolution
Salesforce can not convert field {1} to its new type with a deployment.
- Change the type of {1} manually in the target org before the deployment, if Setup allows this conversion
- Or create a new field with the new type, and copy the data with a data deployment action (https://sfdx-hardis.cloudity.com/salesforce-devops-work-on-user-story-deployment-actions-data/)
- The manual deployment action below reminds to do it in each org of the pipeline, with a checkbox in the Pull Request comments
Deployment action
A deployment action can solve this error. Create it on the Pull Request of the current branch:
sf hardis:project:action:create --agent --scope pr --pr-id current --when pre-deploy --type manual --label "Change the type of field {1}" --instructions "1. In Setup, open Object Manager, the object of {1}, then Fields & Relationships
2. Open {1}, click Change Field Type and select the type it has in the sources
3. If {1} already has this type, there is nothing to do"
Documentation: https://sfdx-hardis.cloudity.com/salesforce-devops-work-on-user-story-deployment-actions-manual/