FlowFields should not be editable (PC0001)
FlowFields are calculated fields. Their values come from other data, and they are never stored directly on the record. In almost every case, a FlowField should not be editable, so set Editable = false. If you leave the property out, the field becomes editable by default.
When a FlowField is editable, the UI allows the user to type something into the field even though the value is calculated. The platform does not validate, store, or pass that input anywhere on its own. If your design requires users to enter a value in a calculated field, you must supply the logic that interprets and saves that input. Without that logic, whatever the user enters is ignored, which leads to confusion.
Example
field(1; MyField; Integer) // FlowFields should not be editable [PC0001]
{
FieldClass = FlowField;
}
Set the property Editable to false on the field.
field(1; MyField; Integer)
{
Editable = false;
FieldClass = FlowField;
}
Exception
When making a FlowField editable intentionally
There are valid scenarios where you intentionally want a FlowField to be editable — for example, to let the user provide a suggested value that your own business logic will validate, transform, and persist to one or more underlying fields. Because such cases are exceptional, the analyzer will raise a warning by default. If you intentionally allow editing for a FlowField, explicitly set Editable = true and add a short comment explaining why the field is editable so reviewers understand the design decision.
Use a pragma directive to suppress the diagnostic, and include a comment that explains how the supplied value is intended to be handled.
// Example: budgeting UI — budget is normally a calculated FlowField (sum of transactions),
// but we want to allow users to submit a suggested budget override. Business logic
// in the codeunit or trigger must explicitly handle and persist the suggested value.
#pragma warning disable PC0001 // FlowField intentionally editable — user-submitted budget suggestions are handled in codeunit X (explain details or link to design doc)
field(1; SuggestedBudget; Decimal)
{
Editable = true; // explicitly allow editing because business logic is expected to handle/save the value
FieldClass = FlowField;
}
#pragma warning restore PC0001
Important: simply making a FlowField editable does not make the platform persist or use the value automatically — implement and document the business logic that will handle the input (validation, persistence, workflows, etc.).