---
id: change/bcapps/9803
type: change
title: "#9803 [master] Variant Code mandatory should not allow to refresh the production order with no variant code"
summary: The Refresh Production Order report now validates that when an item requires a variant code, the production order cannot be refreshed without specifying one.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - report refresh production order
system: manufacturing
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:10:29.855Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 299f021e225f024f75ef49630bc18b2f2be3e46b
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/9803
    title: "microsoft/BCApps#9803: [master] Variant Code mandatory should not allow to refresh the production order with no variant code"
    date: "2026-07-31"
    commit: 299f021e225f024f75ef49630bc18b2f2be3e46b
    t: null
    quote: Variant Code mandatory should not allow to refresh the production order with no variant code
links:
  learn: []
  objects:
    - object/report/99001025
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 9803
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/9803
kind: pr
base_branch: main
major: "30"
merged_at: "2026-07-31T10:40:33Z"
author: neeleshsinghal
author_type: User
community_contribution: false
labels:
  - "Team: SCM"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 4
  additions: 240
  deletions: 6
  al: 1
apps:
  - Base Application
objects_touched:
  - key: report/99001025
    page: report/99001025
    type: report
    id: 99001025
    name: Refresh Production Order
    app: Base Application
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 633092
systems:
  - manufacturing
quote: Variant Code mandatory should not allow to refresh the production order with no variant code
joined_against:
  major: "30"
  commit: ecbc028c25dbe83b61313bc566e6c1d41184bb1c
---

# #9803 [master] Variant Code mandatory should not allow to refresh the production order with no variant code

> The Refresh Production Order report now validates that when an item requires a variant code, the production order cannot be refreshed without specifying one.

[Pull request](https://github.com/microsoft/BCApps/pull/9803) · merged into `main` (BC30) on 2026-07-31 by neeleshsinghal · 4 files (+240 -6), 1 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Added CheckVariantCodeMandatory validation to the report
- Prevents refreshing production orders when variant code is mandatory but not provided
- Introduced OnBeforeCheckVariantCodeMandatory publisher event for extensibility
- Test coverage added for the new validation logic
- Fixes issue where mandatory variant requirement was being bypassed
- Behaviour changes for users or extensions.

## AL objects touched

- [Report 99001025 "Refresh Production Order"](../../objects/report/99001025.md), Base Application: modified

## Context

- Work items: AB#633092
- Labels: Team: SCM
- Systems: manufacturing
- From the description: "Variant Code mandatory should not allow to refresh the production order with no variant code"

Source: metadata of a merged pull request in microsoft/BCApps (bcapps): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).
