✏️ Explanatory Question

What are form patterns in Dynamics 365 Finance & Operations, and why must they be applied to all screens? What is the guideline for using non-custom (standard) patterns, and how do patterns help ensure a consistent UI?

👁 3 Views
📘 Detailed Answer
🟢 Easy
No previous question
No next question
💡

Answer with Explanation

D365 F&O • X++ INTERVIEW

Form Patterns & Screen Guidelines in Dynamics 365 Finance & Operations

Question 42 — Applying standard form patterns for consistent, compliant UI.

Interview Question

What are form patterns in Dynamics 365 Finance & Operations, and why must they be applied to all screens? What is the guideline for using non-custom (standard) patterns, and how do patterns help ensure a consistent UI?

Model Answer (Short)

A form pattern is a predefined template that dictates the structure and layout of a form — which containers, groups and controls it should have and how they are arranged. The guideline is that non-custom (standard) form patterns must be applied to all screens, so every form follows the same familiar structure as the standard application. Applying a pattern enforces consistency, accessibility and responsive behaviour, and the system validates the form against the chosen pattern, flagging missing or misplaced controls. You choose the pattern that matches the form type (e.g. Details Master, Simple List, List Page, Dialog) rather than building a custom, pattern-less layout.

Detailed Explanation

What form patterns do

  • Define the structure and layout a form should follow.
  • The system validates the form against the pattern and flags issues.
  • Ensure consistency with the standard application UI.
  • Provide built-in responsiveness and accessibility.

The guideline

  • Non-custom (standard) patterns must be applied to all screens.
  • Choose the pattern that matches the form type.
  • Avoid building pattern-less / custom layouts where a standard pattern exists.
  • Follow Microsoft's general form guidelines for design.
GOLDEN RULE
Every form = a standard pattern  •  Match the pattern to the form type

Common Form Patterns

Pattern Typical use
Details Master Maintaining a master record with header and tabs (e.g. customers)
Details Master w/ Standard Tabs Master record with a fixed tab structure
Simple List A single grid of records for lightweight maintenance
Simple List & Details A list plus a details section (list on left, detail on right)
List Page A filterable list with action pane for navigation/selection
Dialog A focused input dialog for parameters/actions
Table of Contents Parameter/setup forms with grouped sections

Prerequisites (Rule 5)

  • Visual Studio with the Dynamics 365 developer tools.
  • A custom model / package for your objects.
  • A form with its data sources defined before applying a pattern.
  • Understanding of the form type so you select the right pattern.

Applying a Pattern (steps)

In the designer

  • Right-click the form design node in the designer.
  • Choose Apply pattern and select the appropriate standard pattern.
  • Add the required containers/controls the pattern expects.
  • Resolve any pattern validation warnings shown in the error list.

Example — form control event handler on a patterned form

// Standard patterns still allow custom behaviour via event handlers
[FormControlEventHandler(formControlStr(AbcCustomerDetails, ApproveBtn),
                         FormControlEventType::Clicked)]
public static void ApproveBtn_OnClicked(FormControl sender, FormControlEventArgs e)
{
    FormRun formRun = sender.formRun();
    CustTable custTable = formRun.dataSource(formDataSourceStr(AbcCustomerDetails, CustTable)).cursor();

    custTable.AbcApproved = NoYes::Yes;
    custTable.update();
}

Points the interviewer wants to hear

  • Form patterns define a form's structure and layout.
  • Standard (non-custom) patterns must be applied to all screens.
  • The system validates the form against the pattern.
  • Patterns ensure consistency, accessibility and responsiveness.
  • Pick the pattern that matches the form type (Details Master, List Page, Dialog, etc.).

Likely Follow-up Questions

  • Why must standard form patterns be applied to every screen?
  • What happens if a form doesn't comply with its selected pattern?
  • Which pattern would you use for a filterable list with an action pane?
  • Can you still add custom logic to a patterned form?

Key Takeaway

Apply a standard form pattern to every screen and match it to the form type. Patterns enforce a consistent, accessible and responsive UI, and the system validates your form against the chosen pattern — so avoid building custom, pattern-less layouts.

No previous question
No next question