What’s the Issue?
You may encounter the following error during a deployment:
Error Message:
"Modifying a field of Task or Event is not allowed"
Detailed Message:
"Modifying the field \`${field.name}\` of the \`${apiNameSync(field.parent)}\` object directly is forbidden. Instead, modify the corresponding field in the Activity object."
What Triggers This Error?
This error occurs when an attempt is made to modify a field directly on the Task or Event objects in Salesforce. Salesforce enforces specific rules for these objects, requiring modifications to be made through the Activity object instead of directly on Task or Event.
How Can I Solve This?
To resolve this error, you'll need to make your modifications in the correct location within Salesforce. Here’s how you can do that:
Modify the Corresponding Field in the Activity Object:
- Navigate to the **Activity** object in Salesforce.
- Locate the field that corresponds to the one you were attempting to modify on the Task or Event object.
- Make the necessary changes to the field within the Activity object.
Update Your Salto Configuration:
- Once you’ve made the changes in Salesforce, ensure that your Salto configurations are updated accordingly.
- Perform a new fetch in Salto to capture the changes made to the Activity object.
- Review your deployment plan to ensure that it reflects the correct fields and objects.
Proceed with Deployment:
- After making the necessary modifications in the Activity object and updating your Salto configuration, proceed with the deployment.
- The changes should now be applied successfully without triggering the error.