function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
xpl0idxpl0id 

"Contacts tied to Donations cannot be deleted." when trying to merge Contacts

Hello,

 

I'm writing a small app, that will bulk merge contacts, using partner WSDL.

Here is code that i'm using:

 

private SObject createSObject(String ID,String type)
    {   
        SObject result = new SObject();
        result.setType(type);
        result.setId(ID);
        return result;
    }
    

private void merge(String MasterID,String type, String ChildID)
    {
        connection = Auth.getConnection();
        MergeRequest mReq = new MergeRequest();
        mReq.setMasterRecord(createSObject(MasterID, type));
        mReq.setRecordToMergeIds(new String[] { ChildID });
        MergeRequest[] mergeBatch = new MergeRequest[1];
        mergeBatch[0] = mReq;
        MergeResult[] mRes = connection.merge(mergeBatch)
    }

When i'm trying to merge two contacts, and child has a donation, i get an error:

"Contacts tied to Donations cannot be deleted."

Isn't it suppose to remap donations also? 

 

Thanks

SFDCMattSFDCMatt

Did you ever figure this one out? I just ran into the same problem.

dmchengdmcheng
Most likely you have Blackbaud's Luminate / Common Ground installed in the instance  This app prevents merge or deletion of contacts that are linked to opportunities.