MR
Mayur Rathi
@github
⭐ 34.1k GitHub stars

Pcf-Api-Reference

Pcf-Api-Reference是一款code方向的AI技能,核心价值是Complete PCF API reference with all interfaces and their availability in model-driven and canvas apps,可用于解决开发者在code领域的实际问题,帮助用户提升效率、自动化重复任务或优化工作流。

Complete PCF API reference with all interfaces and their availability in model-driven and canvas apps

Last verified on: 2026-05-30
mkdir -p ./skills/pcf-api-reference && curl -sfL https://raw.githubusercontent.com/github/awesome-copilot/main/skills/pcf-api-reference/SKILL.md -o ./skills/pcf-api-reference/SKILL.md

Run in terminal / PowerShell. Requires curl (Unix) or PowerShell 5+ (Windows).

Skill Content

# Power Apps Component Framework API Reference


The Power Apps component framework provides a rich set of APIs that enable you to create powerful code components. This reference lists all available interfaces and their availability across different app types.


API Availability


The following table shows all API interfaces available in the Power Apps component framework, along with their availability in model-driven apps and canvas apps.


| API | Model-driven apps | Canvas apps |

|-----|------------------|-------------|

| AttributeMetadata | Yes | No |

| Client | Yes | Yes |

| Column | Yes | Yes |

| ConditionExpression | Yes | Yes |

| Context | Yes | Yes |

| DataSet | Yes | Yes |

| Device | Yes | Yes |

| Entity | Yes | Yes |

| Events | Yes | Yes |

| Factory | Yes | Yes |

| Filtering | Yes | Yes |

| Formatting | Yes | Yes |

| ImageObject | Yes | Yes |

| Linking | Yes | Yes |

| Mode | Yes | Yes |

| Navigation | Yes | Yes |

| NumberFormattingInfo | Yes | Yes |

| Paging | Yes | Yes |

| Popup | Yes | Yes |

| PopupService | Yes | Yes |

| PropertyHelper | Yes | Yes |

| Resources | Yes | Yes |

| SortStatus | Yes | Yes |

| StandardControl | Yes | Yes |

| UserSettings | Yes | Yes |

| Utility | Yes | Yes |

| WebApi | Yes | Yes |


Key API Namespaces


Context APIs


The `Context` object provides access to all framework capabilities and is passed to your component's lifecycle methods. It contains:


- **Client**: Information about the client (form factor, network status)

- **Device**: Device capabilities (camera, location, microphone)

- **Factory**: Factory methods for creating framework objects

- **Formatting**: Number and date formatting

- **Mode**: Component mode and tracking

- **Navigation**: Navigation methods

- **Resources**: Access to resources (images, strings)

- **UserSettings**: User settings (locale, number format, security roles)

- **Utils**: Utility methods (getEntityMetadata, hasEntityPrivilege, lookupObjects)

- **WebApi**: Dataverse Web API methods


Data APIs


- **DataSet**: Work with tabular data

- **Column**: Access column metadata and data

- **Entity**: Access record data

- **Filtering**: Define data filtering

- **Linking**: Define relationships

- **Paging**: Handle data pagination

- **SortStatus**: Manage sorting


UI APIs


- **Popup**: Create popup dialogs

- **PopupService**: Manage popup lifecycle

- **Mode**: Get component rendering mode


Metadata APIs


- **AttributeMetadata**: Column metadata (model-driven only)

- **PropertyHelper**: Property metadata helpers


Standard Control


- **StandardControl**: Base interface for all code components with lifecycle methods:

- `init()`: Initialize component

- `updateView()`: Update component UI

- `destroy()`: Cleanup resources

- `getOutputs()`: Return output values


Usage Guidelines


Model-Driven vs Canvas Apps


Some APIs are only available in model-driven apps due to platform differences:


- **AttributeMetadata**: Model-driven only - provides detailed column metadata

- Most other APIs are available in both platforms


API Version Compatibility


- Always check the API availability for your target platform (model-driven or canvas)

- Some APIs may have different behaviors across platforms

- Test components in the target environment to ensure compatibility


Common Patterns


1. **Accessing Context APIs**

```typescript

// In init or updateView

const userLocale = context.userSettings.locale;

const isOffline = context.client.isOffline();

```


2. **Working with DataSet**

```typescript

// Access dataset records

const records = context.parameters.dataset.records;


// Get sorted columns

const sortedColumns = context.parameters.dataset.sorting;

```


3. **Using WebApi**

```typescript

// Retrieve records

context.webAPI.retrieveMultipleRecords("account", "?$select=name");


// Create record

context.webAPI.createRecord("contact", data);

```


4. **Device Capabilities**

```typescript

// Capture

🎯 Best For

  • Claude users
  • GitHub Copilot users
  • Software engineers
  • Development teams
  • Tech leads

💡 Use Cases

  • Code quality improvement
  • Best practice enforcement

📖 How to Use This Skill

  1. 1

    Install the Skill

    Copy the install command from the Terminal tab and run it. The SKILL.md file downloads to your local skills directory.

  2. 2

    Load into Your AI Assistant

    Open Claude or GitHub Copilot and reference the skill. Paste the SKILL.md content or use the system prompt tab.

  3. 3

    Apply Pcf-Api-Reference to Your Work

    Open your project in the AI assistant and ask it to apply the skill. Start with a small module to verify the output quality.

  4. 4

    Review and Refine

    Review AI suggestions before committing. Run tests, check for regressions, and iterate on the skill output.

❓ Frequently Asked Questions

Is Pcf-Api-Reference compatible with Cursor and VS Code?

Yes — this skill works with any AI coding assistant including Cursor, VS Code with Copilot, and JetBrains IDEs.

Do I need specific dependencies for Pcf-Api-Reference?

Check the install command and Works With section. Most code skills only require the AI assistant and your codebase.

How do I install Pcf-Api-Reference?

Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/pcf-api-reference/SKILL.md, ready to use.

Can I customize this skill for my team?

Absolutely. Edit the SKILL.md file to add team-specific instructions, examples, or workflows.

⚠️ Common Mistakes to Avoid

Skipping validation

Always test AI-generated code changes, even for simple refactors.

Missing dependency updates

Check if the skill requires updated dependencies or new packages.

🔗 Related Skills