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
qmanqman 

Problems using Office Toolkit Delete call

Hi,

When I call the Delete method on an account that cannot be deleted because of existing cases, etc. , I do not get back an error message from the COM toolkit. Looking at the SOAPscope I see the following:

result {    errors    {       [xsi:nil = true]       fields = empty,       message = Delete Error: Your attempt to delete Acme Software could not be completed because it is associated with following Cases.,       statusCode = DELETE_FAILED    }    [xsi:nil = true]    id = empty,    success = false }

So I know that the api reports the error.  Here is my code:

try

{

// Retrieve id to row to delete

IField2Ptr idField = pCurSObject->Item("Id");

idField->PutValue(m_idStatusArray[iRow].id);

// salesforce.com delete

hr = pCurSObject->Delete();

}

catch (_com_error e)

{

// error occurred durning update

return (SFReportError(e.Error(),

IID_IRowsetChange,

pCurSObject->GetError(),

pCurSObject->GetErrorMessage()));

}

enum SError sfError = pCSFSession->GetError();

if (sfError != NO_SF_ERROR)

{

// error occurred durning query

return (SFReportError(DB_E_ERRORSINCOMMAND,IID_IRowsetChange,sfError,pCurSObject->GetErrorMessage()));

}

Thanks,

Bill Emerson