microsoft / microsoft/BCApps

[Bug]: SalesLineOnCheckServItemCreation event subscriber causes error if sale line No. has yet to be entered

Open Beginner friendly
#10,576 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Approved Team: SCM
Dominant language
AL
Stars
683
Forks
459
Avg merge
3d 26m
Merged PRs (30d)
633

Description

Describe the issue

In codeunit 6450 "Serv. Integration Mgt.", event subscriber / procedure SalesLineOnCheckServItemCreation will use Item.Get(SalesLine."No.") even if the No. field is blank, which causes an error.

An example of when this will come up: before entering item No. into a new sales line, first enter the Quantity.

Expected behavior

if SalesLine."No." = '' then
exit;

Steps to reproduce

Add a new sales line to a Sales Order, but before specifying the item No., input a Quantity.

Additional context
Image
I will provide a fix for a bug
  • I will provide a fix for a bug

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in codeunit 6450 "Serv. Integration Mgt." at the SalesLineOnCheckServItemCreation event subscriber, and reproduce the issue by entering a Quantity on a new sales order line before its No. field. The work is done when this sequence no longer errors because a blank SalesLine No. is handled, while normal item-number processing remains unchanged.

Written by the indexing model from the issue text.

Assessment

Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
84/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.