---
id: change/bcapps/14060
type: change
title: "#14060 [Shopify] Automatically move negative exchange lines"
summary: Shopify shop configurations now offer an option to automatically move negative exchange lines from return orders into separate sales documents (orders or invoices) before release, with rollback protection and enhanced warning handling.
tier: official
language: en
tags:
  - feature
  - main
  - bc30
  - page shpfy shop card
  - table shpfy shop
  - codeunit shpfy create sales doc. refund
  - codeunit copy document mgt.
system: integration
review:
  state: reviewed
  by: opus
  at: "2026-12-02T01:06:00.421Z"
  flags: []
generated:
  at: "2026-12-05T00:13:03.967Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 35435ef894cd6336bad48f4be792102f21f7a50a
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/14060
    title: "microsoft/BCApps#14060: [Shopify] Automatically move negative exchange lines"
    date: "2026-12-01"
    commit: 35435ef894cd6336bad48f4be792102f21f7a50a
    t: null
    quote: Automatic movement applies to sales return orders and reuses the standard move routine before release, preserving Shopify identifiers and document links.
links:
  learn: []
  objects:
    - object/page/30101
    - object/table/30102
    - object/codeunit/30246
    - object/codeunit/6620
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
  related:
    - to: https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-creating-and-interacting-with-odatav4-bound-action
      title: Creating and Interacting with an OData V4 Bound Action
      label: possibly related
      why: touches Codeunit 6620 "Copy Document Mgt."
      by: code
    - to: https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-extending-shopify
      title: Extending Shopify
      label: possibly related
      why: touches Table 30102 "Shpfy Shop"
      by: code
    - to: https://learn.microsoft.com/dynamics365/business-central/SRB/working-with-contracts/manual-contract-lines
      title: Manually create contract lines
      label: possibly related
      why: Documents contract line types and negative quantity handling for subscription billing
      by: model
number: 14060
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/14060
kind: pr
base_branch: main
major: "30"
merged_at: "2026-12-01T12:08:29Z"
author: onbuyuka
author_type: User
community_contribution: false
labels:
  - "AL: Apps (W1)"
  - "Team: Integrations"
change_class: code
change_kind: feature
behavior_change: true
breaking: false
files:
  count: 12
  additions: 720
  deletions: 1
  al: 10
apps:
  - Base Application
  - Shopify
objects_touched:
  - key: page/30101
    page: page/30101
    type: page
    id: 30101
    name: Shpfy Shop Card
    app: Shopify
    status: modified
  - key: table/30102
    page: table/30102
    type: table
    id: 30102
    name: Shpfy Shop
    app: Shopify
    status: modified
  - key: codeunit/30246
    page: codeunit/30246
    type: codeunit
    id: 30246
    name: Shpfy Create Sales Doc. Refund
    app: Shopify
    status: modified
  - key: codeunit/6620
    page: codeunit/6620
    type: codeunit
    id: 6620
    name: Copy Document Mgt.
    app: Base Application
    status: modified
objects_unjoined:
  - path: src/Apps/W1/Shopify/App/src/Order Return Refund Processing/Enums/ShpfyMoveNegativeLinesTo.Enum.al
    status: added
    reason: not-in-snapshot
  - path: src/Layers/IT/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al
    status: modified
    reason: not-in-snapshot
  - path: src/Layers/NL/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al
    status: modified
    reason: not-in-snapshot
  - path: src/Layers/RU/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al
    status: modified
    reason: not-in-snapshot
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 659113
systems:
  - integration
  - platform
quote: Automatic movement applies to sales return orders and reuses the standard move routine before release, preserving Shopify identifiers and document links.
joined_against:
  major: "30"
  commit: f53bb0f1ecd89fde9f133f9dcaf5bf43cf5f2671
---

# #14060 [Shopify] Automatically move negative exchange lines

> Shopify shop configurations now offer an option to automatically move negative exchange lines from return orders into separate sales documents (orders or invoices) before release, with rollback protection and enhanced warning handling.

[Pull request](https://github.com/microsoft/BCApps/pull/14060) · merged into `main` (BC30) on 2026-12-01 by onbuyuka · 12 files (+720 -1), 10 AL · feature · tier official · reviewed (checked by Opus)

## What changed

- New shop-level setting 'Move Negative Lines To' with options: Do Not Move (default), Sales Order, or Sales Invoice
- Automatic movement applies when processing Shopify exchanges, reusing standard copy routines while preserving Shopify identifiers and links
- Existing Auto Release toggle controls both the original return document and its auto-generated replacement
- Enhanced error handling with rollback: blocked entities raise original errors to prevent partial completion
- Overload added to Copy Document Mgt codeunit and propagated across all localization layers (ES, IT, NA, NL, RU, W1)
- Behaviour changes for users or extensions.

## AL objects touched

- [Page 30101 "Shpfy Shop Card"](../../objects/page/30101.md), Shopify: modified
- [Table 30102 "Shpfy Shop"](../../objects/table/30102.md), Shopify: modified
- [Codeunit 30246 "Shpfy Create Sales Doc. Refund"](../../objects/codeunit/30246.md), Shopify: modified
- [Codeunit 6620 "Copy Document Mgt."](../../objects/codeunit/6620.md), Base Application: modified
- `src/Apps/W1/Shopify/App/src/Order Return Refund Processing/Enums/ShpfyMoveNegativeLinesTo.Enum.al`: added, not in the BC30 snapshot yet
- `src/Layers/IT/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al`: modified, not in the BC30 snapshot
- `src/Layers/NL/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al`: modified, not in the BC30 snapshot
- `src/Layers/RU/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al`: modified, not in the BC30 snapshot

## Context

- Work items: AB#659113
- Labels: AL: Apps (W1), Team: Integrations
- Systems: integration, platform
- From the description: "Automatic movement applies to sales return orders and reuses the standard move routine before release, preserving Shopify identifiers and document links."

## Possibly related

No source states these links: they share an object, a model read them, or a person found the same subject.

- [Creating and Interacting with an OData V4 Bound Action](https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-creating-and-interacting-with-odatav4-bound-action) — possibly related: touches Codeunit 6620 "Copy Document Mgt."
- [Extending Shopify](https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-extending-shopify) — possibly related: touches Table 30102 "Shpfy Shop"
- [Manually create contract lines](https://learn.microsoft.com/dynamics365/business-central/SRB/working-with-contracts/manual-contract-lines) — possibly related: Documents contract line types and negative quantity handling for subscription billing (model-linked)

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).
