Skip to content

[Bug]: "Shopify Connector". "Line No." error in "Create Sales Doc. Refund" codeunit 30246. #5884

@frankmortensen

Description

@frankmortensen

Describe the issue

The procedure GetLastLineNo() used in CreateSalesLines() in codeunit 30246 "Shpfy Create Sales Doc. Refund" returns the highest existing Sales Line "Line No." in the related "Sales Header". That is OK, but the value is used to create the next "Sales Line" as is, and if a "Sales Line" already exists on the Sales Header (maybe an automatically created comment line or similar), the procedure CreateSalesLines() will fail.

Expected behavior

10000 should be added to the returned value from GetLastLineNo() before being used to insert a new "Sales Line".

Steps to reproduce

Install an extension of some sort that creates a comment line when "Sales Header - OnInsert()" is triggered.
Tick "Shopify Order No. on Doc. Line" i Shop Setup.
Create a refund ...

Additional context

No response

I will provide a fix for a bug

  • I will provide a fix for a bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    ApprovedThe issue is approvedIntegrationGitHub request for Integration area

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions