Study FAQ
How do I read Dataverse table metadata in a Power Apps code app?
Also asked as 2
- How can a code app show localized Dataverse column labels?
- What can the generated getMetadata method return for a Dataverse table?
Answer
Use the generated table service's getMetadata method to request the table properties, column definitions and relationships your code app needs. This is a read of definitions. Continue to check the user's actual permission on any later data operation.
For a configured Dataverse Account data source, request AccountsService.getMetadata({ metadata: ["DisplayName"], schema: { columns: ["name", "telephone1"] } }). Check the operation result and use a column's localized display label when present. Provide a readable fallback when the label or requested metadata is unavailable. Request relationship metadata only for the relationship types the screen uses.
This method exposes base column metadata. If the UI requires choice options from derived attribute types, use a supported contract for those options. In an isolated app, test a localized label, an absent label and a restricted user to confirm the rendering and authorization behave independently.
Full explanation
AB-400: Building Code Apps with Dataverse and Automation
Study guide · AB-400
Read the full explanation