bc-api-query-generator

Generate AL API query objects with joins, filters, and aggregations for OData endpoints.

20|5|Updated Apr 1, 2026
One-click install
npx skills add https://github.com/fernandoartalf/AL-Copilot-Skills-Collection --skill bc-api-query-generator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bc-api-query-generator
Source: https://github.com/fernandoartalf/AL-Copilot-Skills-Collection/tree/main/skills/bc-api-query-generator
Command: npx skills add https://github.com/fernandoartalf/AL-Copilot-Skills-Collection --skill bc-api-query-generator

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the generation of AL API query objects that expose data via OData endpoints, reducing manual coding effort and ensuring consistency.

Core Features & Use Cases

  • Automated Query Generation: Produces complete AL query files based on user specifications, including joins, filters, and aggregations.
  • Supports Complex Relationships: Handles multi-table joins with dataitem nesting, DataItemLink, and SqlJoinType configurations.
  • Use Case: When creating a read-only API for a multi-entity report, this Skill supports rapid generation of accurate and standardized queries using defined patterns.

Quick Start

Use the bc-api-query-generator skill to generate an API query file for a sales order and associated customer details with join conditions and filters.

Frequently Asked Questions about bc-api-query-generator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create AL API query objects to expose relational data through OData endpoints?

You create AL API query objects by defining data items, join conditions, and filters within the AL query file, which this process automates to expose relational data through OData endpoints with consistent property setup and naming conventions.

Can I use multi-table joins and aggregations in an AL query for Business Central reporting?

Yes, AL queries support multi-table joins and aggregations for Business Central reporting by configuring dataitem nesting, DataItemLink, and SqlJoinType, allowing you to combine entities like sales orders and customer details accurately.

What is the best way to automate generating read-only API queries for multi-entity reports?

Automating read-only API queries for multi-entity reports is best achieved by generating standardized AL query files from specifications, ensuring correct join types and filters are applied for accurate OData exposure without manual coding effort.

Does the AL query generator support SqlJoinType and DataItemLink configurations for complex relationships?

Yes, the AL query generation process supports complex relationships by handling dataitem nesting, DataItemLink, and SqlJoinType configurations to ensure multi-table joins are correctly established for relational data exposure.

When do I need an AL query object instead of a standard AL page for OData integration?

You need an AL query object instead of a standard AL page when creating read-only APIs for reporting or integrations that require complex multi-table joins, aggregations, and specific filtering across relational data.

Why are my manually coded AL API queries failing to maintain consistent naming conventions?

Manually coded AL API queries often lack consistent naming conventions due to human error, which automating the generation process solves by enforcing standardized property setup and naming patterns across all generated query files.