---
title: Getting an error while creating an activity
description: "Issue: Getting an error while creating a custom activity - Cannot add or update a child row: a foreign key constraint fails (`internalsq32_mxradon`.`CustomObjectProspectActivity_Base`, CONSTRAINT `FK_COPAB_RelatedCustomObjectId` FOREIGN KEY ..."
url: "https://supportb.kinsta.cloud/docs/getting-an-error-while-creating-an-activity/"
updated: "2024-09-21"
category: General
---

# Getting an error while creating an activity

**Issue**: Getting an error while creating a custom activity - Cannot add or update a child row: a foreign key constraint fails (\`internalsq32_mxradon\`.\`CustomObjectProspectActivity_Base\`, CONSTRAINT \`FK_COPAB_RelatedCustomObjectId\` FOREIGN KEY (\`RelatedCustomObjectId\`) REFERENCES \`CustomObject_Base\` (\`CustomObjectId\`) )", "ReasonForFailure": "Cannot add or update a child row: a foreign key constraint fails (\`internalsq32_mxradon\`.\`CustomObjectProspectActivity_Base\`, CONSTRAINT \`FK_COPAB_RelatedCustomObjectId\` FOREIGN KEY (\`RelatedCustomObjectId\`) REFERENCES \`CustomObject_Base\` (\`CustomObjectId\`).

![Preview](https://desk.zoho.in/support/ImageDisplay?downloadType=uploadedFile&fileName=1726030299426.png&blockId=edbsnc1ae4f52d969b9ac2851e2b924f2fdd1dd50f8398969314208704be8794ec72f&zgId=edbsnb94eea216c2b0d7d218bf29c6a0d6f91&mode=view)

**RCA:  **This issue happened because of some common name of CFS fields with normal custom fields used in the form.

**Solution**: Deleted the duplicate lead.
