Case updates should be deliberate and validated. This part adds a controlled edit experience for priority, status reason, and selected business fields.
1. Use choice controls
Populate dropdowns from the Dataverse choice metadata where possible. Avoid entering numeric option values manually. Status and Status Reason are related platform fields; not every status-reason value is valid for every status.
2. Patch ordinary fields
IfError(
Patch(
Cases,
varSelectedCase,
{
Description: txtDescription.Text,
Priority: cmbPriority.Selected
}
),
Notify("Update failed: " & FirstError.Message, NotificationType.Error),
Notify("Case updated.", NotificationType.Success)
)
Use the exact choice record shape surfaced by your Dataverse connector. The example demonstrates the pattern; verify whether the control returns a choice record or a scalar value in your app.
3. Change status through supported transitions
For status and status reason, use the standard Case lifecycle and permitted transitions in your environment. Some operations—such as resolving or cancelling a Case—are specialized platform operations and should not be treated as an ordinary text or choice update. Use the supported Dataverse action or API for the intended lifecycle operation.
4. Ownership changes
Reassigning a Case requires the appropriate Assign privilege and a valid owner (user or team). Implement assignment through a supported Dataverse action or connector operation; do not patch an owner lookup as if it were a normal text field.
