A code component calls context.device.captureImage and context.webAPI.retrieveMultipleRecords. The TypeScript compiles and the component builds without warnings, but in the model-driven app both calls fail at runtime as unsupported or unavailable. What is the most likely fix?
Select an answer to reveal the explanation.
Short Explanation
Some framework features need a permission slip in the manifest before you're allowed to use them. You list them in feature-usage, and suddenly the calls that compiled fine also work at runtime.
Full Explanation
The component framework requires a component to declare certain capabilities in its manifest before it can use them. Inside the feature-usage element, uses-feature entries name the feature, such as Device.captureImage for the camera or WebAPI for Dataverse data operations, and indicate whether the feature is required. The TypeScript definitions include these APIs regardless of the manifest, which is why the code compiles, but at runtime the host only enables features the manifest declares, so undeclared calls fail. Platform libraries are a different mechanism: they let virtual components use the platform's shared React and Fluent UI instead of bundling their own, and they do not grant access to device or data APIs. The control type controls how rendering works, standard into a container or virtual returning a React element, and both types use the same feature declarations. Code components are added to columns, grids or canvas apps; a site map lists navigation areas, and registering the component there is not how components are deployed or granted capabilities. Exam caveat: some device features depend on the host, so camera capture is meaningful in the mobile app and can behave differently in a desktop browser. Operational check: update the manifest, rebuild so the generated types refresh, redeploy, and confirm both calls succeed on the target device.