[Bug]: SalesLineOnCheckServItemCreation event subscriber causes error if sale line No. has yet to be entered
Nobody has claimed this yet.
- 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
I will provide a fix for a bug
- I will provide a fix for a bug
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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