• Patryk Stefaniak
  • NEWBIE
  • 10 Points
  • Member since 2023

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies

Hi everyone,

I'm trying to log a call as an activity in a lead. This is the record I'm passing to the saveLog Method:

task = {
    entityApiName: 'Task',
    CallDisposition: 'Success',
    CallType: direction,
    Subject: (isCallOutbound ? 'Call to ' : 'Call from ') + displayName,
    ActivityDate: date,
    CompletedDateTime: date,
    IsClosed: true,
    Type: 'Call',
    TaskSubtype: 'Call',
    Status: 'Completed'
};

if (recordType == 'Contact') {
    task.WhoId = popData.Id;
} else { // Account / Lead
    task.WhatId = popData.Id;
}

cti.saveLog({
    value: task,
    callback: ...
});
I tried changing the entityApiName to 'Activity', but that seemed wrong as I was getting the following error: "You don't have access to this record. Ask your administrator for help or to request access.".

I've also been getting an error related to the WhatId attribute: "Related To ID: id value of incorrect type: 00Q0900000OHl0UEAT".

Would apprieciate any help. Also a link to a detailed description of which fields can be passed to the saveLog method, if there is one.

Hi everyone,

I'm trying to log a call as an activity in a lead. This is the record I'm passing to the saveLog Method:

task = {
    entityApiName: 'Task',
    CallDisposition: 'Success',
    CallType: direction,
    Subject: (isCallOutbound ? 'Call to ' : 'Call from ') + displayName,
    ActivityDate: date,
    CompletedDateTime: date,
    IsClosed: true,
    Type: 'Call',
    TaskSubtype: 'Call',
    Status: 'Completed'
};

if (recordType == 'Contact') {
    task.WhoId = popData.Id;
} else { // Account / Lead
    task.WhatId = popData.Id;
}

cti.saveLog({
    value: task,
    callback: ...
});
I tried changing the entityApiName to 'Activity', but that seemed wrong as I was getting the following error: "You don't have access to this record. Ask your administrator for help or to request access.".

I've also been getting an error related to the WhatId attribute: "Related To ID: id value of incorrect type: 00Q0900000OHl0UEAT".

Would apprieciate any help. Also a link to a detailed description of which fields can be passed to the saveLog method, if there is one.