Skip to main content

onProjectGet

Last updated 23/07/2026

Project retrieval handler

This example demonstrates how the

callback retrieves a project from the host application. Once the project has been found, it is returned to the widget through the

onResponse
callback.

TypeScript
Project retrieval handler
onProjectGet: (projectKey: string, onResponse: (result: DIQ_Result, project: DIQ_Project | null) => void) => {

// Retrieve the project from the application's database
const project = database.getProject(projectKey);

// Return the project to the widget
onResponse({
success: true
}, project);

};