"Warehouse Request" has wrong Table Relation for "Shipping Agent Service Code"
https://github.com/microsoft/BCApps/blame/efc984a5d18e7f4ef3009a1917fbfd6c057a310b/src/Layers/W1/BaseApp/Warehouse/Request/WarehouseRequest.Table.al#L99
Current Table Relation:
TableRelation = "Shipping Agent Services";
This prevents a Validate on the field.
Correct Table Relation:
TableRelation = "Shipping Agent Services".Code;
Or even:
TableRelation = "Shipping Agent Services".Code where("Shipping Agent Code" = field("Shipping Agent Code"));
In the base app this field is only ever assigned to. But if the wrong Table Relation is to be ignored, then it should be rather removed entirely.
:robot: AI triage completed. Product group, please validate the triage report (Microsoft internal access only, use Ctrl+Click to open in new tab).
Was this triage helpful? React with :thumbsup: or :thumbsdown: on this comment to provide feedback.
Coverage: issue-only analysis of microsoft/BCApps#12623; no code change reviewed; no implementation or fix proposed; repository evidence searched: table 5765 source, its table extensions, usages of the field in src/Layers and src/Apps, the W1 and IN SCM tests, DME lookup, and recent file history; not covered: runtime reproduction, blame or commit history beyond the last sync commit, translation artifacts, and disabled-test and build definitions.
BC impact analysis
Affected areas
- Warehouse (warehouse requests)
- Transfers and shipping
Reported severity and reproducibility: Validate on "Shipping Agent Service Code" fails because of the table relation, a blocking error for extensions only. Reproducibility is partial: the issue names the field and file but gives no repro steps.
Customer-facing behavior: Reported: Validate on the field does not work. Expected: Validate works against the Shipping Agent Services code.
Existing tests
- SCM Transfers.TransferOrderCreateInboundWhseRequestShipAgentServCode (codeunit 137038) - would not catch the reported scenario (it assigns the value, never validates it)
- SCM Transfers.TransferOrderCreateOutboundWhseRequestShipAgentServCode (codeunit 137038) - same
- Test codeunits identified: codeunit 137038 "SCM Transfers"
Affected E2E scenarios
- Transfer order to warehouse request: the field is copied on request creation; assignment works but Validate would not
- Warehouse shipment from source documents: the code is copied into the shipment header
Existing tests for affected E2E scenarios
- Transfer order to warehouse request: the two tests above (Partial; do not detect the behavior)
- Warehouse shipment from source documents: None identified
- E2E test codeunits identified: codeunit 137038 "SCM Transfers"
Localizations impacted: None identified (potentially: IN, test copy only)
First-party apps impacted: None identified
Potentially impacted first-party apps: None identified
Recommendation: Recommend: Approve - The issue names a specific field, and base-app code sets it without validating it. No duplicate, by-design constraint or country-specific consumer was found. Reproduction is partial, but the evidence is concrete and narrow.
Suggested test buckets to run in DME
- Buckets: RunALTests_W1_Bucket6
- Unmapped / needs manual bucket assignment: none
A full regression and impact analysis was generated by scm-impact-agent.
@PredragMaricic, should a Warehouse Request accept only service codes belonging to its selected Shipping Agent? That’s the difference between the two fixes @achim-t proposed. Could you confirm which behavior SCM expects and whether a fix is already underway? If not, we can invite a PR for that specific behavior.