[Shopify] Shopify Order Number as Document Number#6721
Open
GediminasGaubys wants to merge 2 commits intomicrosoft:mainfrom
Open
[Shopify] Shopify Order Number as Document Number#6721GediminasGaubys wants to merge 2 commits intomicrosoft:mainfrom
GediminasGaubys wants to merge 2 commits intomicrosoft:mainfrom
Conversation
Introduces a configurable setting to use the Shopify order number as the document number for Sales Orders and Sales Invoices, with validation to prevent invalid characters. Updates UI, logic, and tests to support the new option and ensure correct propagation and behavior.
Cleans up UI by eliminating unnecessary tooltip descriptions and the explicit default value assignment for the Shopify order number usage option. Simplifies maintenance and reduces duplication, as field intent is already clear from context.
|
Could not find linked issues in the pull request description. Please make sure the pull request description contains a line that contains 'Fixes #' followed by the issue number being fixed. Use that pattern for every issue you want to link. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implementation Description - Shopify Order Number as Document Number
Summary
This PR introduces a configurable option to use Shopify order numbers as document numbers for Sales Orders and Sales Invoices in Business Central, enabling consistent order identifiers across both systems and improving traceability.
Changes
New Functionality:
Configuration Setting in Shop Card:
Order-Level Override:
Document Number Assignment Logic:
Character Validation:
Order Import Integration:
OrderHeader."Use Shopify Order No." := Shop."Use Shopify Order No."during import.Prerequisites:
Tests
Added comprehensive test coverage in ShpfyOrdersAPITest codeunit:
Configuration Propagation Tests:
UnitTestImportOrderPropagatesUseShopifyOrderNo(): Verifies setting propagates when enabled.UnitTestImportOrderPropagatesUseShopifyOrderNoDisabled(): Verifies setting propagates when disabled.Sales Order Creation Tests:
UnitTestCreateSalesOrderWithShopifyOrderNo(): Sales Order uses Shopify number when enabled.UnitTestCreateSalesOrderWithoutShopifyOrderNo(): Sales Order uses BC number series when disabled.Validation Tests:
UnitTestCreateSalesOrderWithShopifyOrderNoInvalidChar(): Error handling for "@" prefix.Sales Invoice Creation Tests:
UnitTestCreateSalesInvoiceWithShopifyOrderNo(): Sales Invoice uses Shopify number for fulfilled orders.Test Helper Methods:
SetManualNosOnOrderNoSeries(): Enables manual numbers on order series.SetManualNosOnInvoiceNoSeries(): Enables manual numbers on invoice series.Fixes #