Showing results for 
Search instead for 
Did you mean: 

Determine the type of App the control is added on

When a code component created using Power Apps Component Framework is added to an App; if PCF context can provide a way to identify on which it was added (Model-driven or Canvas) so we can logically make a decision weather to use functions that are only supported on Model-driven app.

Similar idea

Didn't search for an existing idea before I created this. 

Status: New
Solution Sage

let me add this here in case people aren't aware:-


The Xrm library is only defined if a PCF component is running in a model driven app where Xrm is practical..


var type="Canvas";

if (typeof(Xrm)==="undefined"){
I would suggest this is need going forward though as with portals supporting PCF in the future and the possibility that Dataflex (none pro) may support PCF it would be useful to know exactly where the app is running.