0

We have a CRM connector build using open cti APIs. I am passing some parameters in saveLog() method as follow-

sforce.opencti.saveLog({value: { entityApiName: 'Task', WhoId: whoID, WhatID: whoID, Subject: subject, CallType: calltype, Description: description, Priority: 'Normal', Status: 'Completed', CallDurationInSeconds: talktime, ActivityDate: dueDate }, callback: callbackmethod}) }

Its working fine when some matching record is found, i.e value of 'WhoId' is not null or undefined. I am getting following error in response.

code : "GENERIC_ERROR" description : " An error occurred while calling the API method We couldn't find the record you're trying to access. It may have been deleted by another user, or there may have been a system error. Ask your administrator for help.. Error: ."

Any help will be appreciated. Thanks.

1 Answer 1

0

If the contact doesn't exist in your system, the WhoId won't exist. You'll need to create a new contact if the WhoId == null before you can create the Task. Depending on the rest of your code, you could also surround that with a try-catch block.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .