Skip to content
This repository was archived by the owner on Oct 19, 2026. It is now read-only.
This repository was archived by the owner on Oct 19, 2026. It is now read-only.

[W1][Report][6699][Move Negative Sales Lines] Replace FromDocType, ToDocType, and ToDocType2 Option variables with extensible Enums #30348

Closed as not planned

Description

@mavohra

Why do you need this change?

The Move Negative Sales Lines report uses the global variables FromDocType, ToDocType, and ToDocType2, all of which are of type Option to determine the supported document types.

Since Option variables are not extensible, partners and ISVs cannot introduce additional document types through a report extension. This forces direct Base Application modifications for scenarios that should otherwise be supported through extensibility.

Replacing these option variables with extensible enums would enable extension-based customizations while preserving the existing report behavior.

Describe the request

Our extension introduces additional sales document types that need to participate in the Move Negative Sales Lines process.

The report determines the source and destination document types using the global option variables FromDocType, ToDocType, and ToDocType2. Because these are Option variables, there is currently no supported way to add new document types through a report extension.

Replacing these variables with extensible enums would provide a supported extensibility point, allowing partners and ISVs to extend the report without requiring Base Application customizations.
Internal work item: AB#642554

Activity

  1. changed the title [-][W1][Report][Move Negative Sales Lines] Replace FromDocType, ToDocType, and ToDocType2 Option variables with extensible Enums[/-] [+][W1][Report][6699][Move Negative Sales Lines] Replace FromDocType, ToDocType, and ToDocType2 Option variables with extensible Enums[/+] on Jul 13, 2026
  2. added
    missing-infoThe issue misses information that prevents it from completion.
    on Jul 13, 2026
  3. github-actions commented on Jul 13, 2026

    @github-actions
    Contributor

    Hi Ahmed Vohra (@mavohra),

    Thank you for your extensibility request. To help us process it efficiently, please update the issue to include the required information.

    📚 Extensibility Guidelines

    Missing Information:

    • Enum definition: Please provide the full proposed enum definition for each replacement enum for FromDocType, ToDocType, and ToDocType2, including the enum name, all values, captions, and ordinals.

    Please update the issue with the missing details. We'll automatically re-analyze once updated.

    Note

    Automatically generated by the Triage Agent — advisory only. An engineer will review before any action is taken.

    Tip

    Not accurate? Reply with /not-accurate (optional: add a short explanation). Your feedback improves future responses.

  4. mavohra commented on Jul 17, 2026

    @mavohra
    Author

    Enum definition

    Proposed replacement enums, preserving the exact ordinals/captions of the current Option values so the change is non-breaking for any existing callers (AssignmentCompatibility = true):

    FromDocType

    enum 6699 "Move Neg. Sales Lines From Type"
    {
        Extensible = true;
        AssignmentCompatibility = true;
    
        value(0; Quote) { Caption = 'Quote'; }
        value(1; "Blanket Order") { Caption = 'Blanket Order'; }
        value(2; Order) { Caption = 'Order'; }
        value(3; Invoice) { Caption = 'Invoice'; }
        value(4; "Return Order") { Caption = 'Return Order'; }
        value(5; "Credit Memo") { Caption = 'Credit Memo'; }
    }

    ToDocType / ToDocType2

    Both variables use the same six document types today (Option ,,"Order",Invoice,"Return Order","Credit Memo"), so one enum can serve both:

    enum 6700 "Move Neg. Sales Lines To Type"
    {
        Extensible = true;
        AssignmentCompatibility = true;
    
        value(0; Quote) { Caption = 'Quote'; }
        value(1; "Blanket Order") { Caption = 'Blanket Order'; }
        value(2; Order) { Caption = 'Order'; }
        value(3; Invoice) { Caption = 'Invoice'; }
        value(4; "Return Order") { Caption = 'Return Order'; }
        value(5; "Credit Memo") { Caption = 'Credit Memo'; }
    }
  5. added
    SCMGitHub request for SCM area
    enum-requestRequest for adding an enum value or type
    and removed
    missing-infoThe issue misses information that prevents it from completion.
    on Jul 17, 2026
  6. github-actions commented on Jul 17, 2026

    @github-actions
    Contributor

    ✅ Analysis complete - ready for further processing


    Implementation:

    Replace global variables FromDocType, ToDocType, and ToDocType2 in report 6699 Move Negative Sales Lines with extensible enums, using enum 6699 "Move Neg. Sales Lines From Type" for FromDocType and enum 6700 "Move Neg. Sales Lines To Type" for ToDocType and ToDocType2, preserving the current ordinals and captions with AssignmentCompatibility = true.

    enum 6699 "Move Neg. Sales Lines From Type"
    {
        Extensible = true;
        AssignmentCompatibility = true;
    
        value(0; Quote) { Caption = 'Quote'; }
        value(1; "Blanket Order") { Caption = 'Blanket Order'; }
        value(2; Order) { Caption = 'Order'; }
        value(3; Invoice) { Caption = 'Invoice'; }
        value(4; "Return Order") { Caption = 'Return Order'; }
        value(5; "Credit Memo") { Caption = 'Credit Memo'; }
    }
    
    enum 6700 "Move Neg. Sales Lines To Type"
    {
        Extensible = true;
        AssignmentCompatibility = true;
    
        value(0; Quote) { Caption = 'Quote'; }
        value(1; "Blanket Order") { Caption = 'Blanket Order'; }
        value(2; Order) { Caption = 'Order'; }
        value(3; Invoice) { Caption = 'Invoice'; }
        value(4; "Return Order") { Caption = 'Return Order'; }
        value(5; "Credit Memo") { Caption = 'Credit Memo'; }
    }

    File: MoveNegativeSalesLines.Report.al

    Note

    Automatically generated by the Triage Agent — advisory only. An engineer will review before any action is taken.

    Tip

    Not accurate? Reply with /not-accurate (optional: add a short explanation). Your feedback improves future responses.

  7. AleksandricMarko commented on Sep 3, 2026

    @AleksandricMarko
    Contributor

    Hello Ahmed Vohra (@mavohra),

    Report "Move Negative Sales Lines" is pretty simple.
    Why do not you create your own version for specific scenarios you have?

  8. AleksandricMarko commented on Oct 16, 2026

    @AleksandricMarko
    Contributor

    Closing as not planned.
    In case you still need it, please open new issue on BCApps (https://github.com/microsoft/BCApps/issues)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    SCMGitHub request for SCM areaenum-requestRequest for adding an enum value or type

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions