web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested Answer

CIF listeners not firing

(0) ShareShare
ReportReport
Posted on by 20

Hi,

I am writing some code for the channel integration framework, using a softphone. The Microsoft.CIFramework.searchAndOpenRecords functions are working fine, but I can't seem to get the even handlers working, e.g. click to act and onpagenavigate.

This is the code I am using to start the handlers, but the listener is not starting at all. The initCTI is being written to the log, but nothing else happens. Any help would be appreciated. I am calling the function after the softphone has finished loading.

// JavaScript source code
export function pageNavigateHandler(eventData) {

console.log("eventFired")
console.log(eventData)
return Promise.resolve();
}

export default function initCTI() {
console.log("initCTI");

(function () {
window.addEventListener("CIFInitDone", function () {

console.log("handler startedtest");
Microsoft.CIFramework.addHandler("onpagenavigate", pageNavigateHandler);
console.log("Added handlers for the panel");
//Code that consumes CIF library APIs.
});
})();

}

I have the same question (0)
  • Suggested answer
    abhi5459 Profile Picture
    2 on at
    I tried the same thing and found out the issue. The CIFInitDone event is triggered before the web resource's code is loaded. It means that the code which is adding the event listener for CIFInitDone is loaded after the event is triggered from dynamics CIF library, so the event is never captured at all.
     
    Hopefully this will be fixed soon by ms dynamics team. In the meantime, I think we can assume that it is initialised before web resource is loaded.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
11manish Profile Picture

11manish 78 Super User 2026 Season 2

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 44 Super User 2026 Season 2

#3
ParthPatel249 Profile Picture

ParthPatel249 40

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans