Skip to main content
added 10 characters in body
Source Link
salesforce-sas
  • 24.5k
  • 5
  • 44
  • 79

Can anyone tell me why this code

handleCDC(response) {
    console.log(JSON.stringify(response));

}

}

subscribe(channel, -1, handleCDC).then(response=>{
    console.log('success', JSON.stringify(response.channel));
});    

is illegal? why I can't call subscribe method directly?

Can anyone tell me why this code

handleCDC(response) {
console.log(JSON.stringify(response));

}

subscribe(channel, -1, handleCDC).then(response=>{
    console.log('success', JSON.stringify(response.channel));
});    

is illegal? why I can't call subscribe method directly?

Can anyone tell me why this code

handleCDC(response) {
    console.log(JSON.stringify(response));
}

subscribe(channel, -1, handleCDC).then(response=>{
    console.log('success', JSON.stringify(response.channel));
});    

is illegal? why I can't call subscribe method directly?

Source Link
pincet
  • 951
  • 3
  • 12
  • 34

empAPI - can't call subscribe method

Can anyone tell me why this code

handleCDC(response) {
console.log(JSON.stringify(response));

}

subscribe(channel, -1, handleCDC).then(response=>{
    console.log('success', JSON.stringify(response.channel));
});    

is illegal? why I can't call subscribe method directly?