Skip to content

[Extensibility request] Page 46 "Sales Order Subform" – OnValidate("Description") #30256

@Mariangela-DeMaio-EOS

Description

@Mariangela-DeMaio-EOS

Why do you need this change?

Hi,
Starting from BC 28.1, a change in the Base Application affects the behavior of the OnValidate trigger of the "Description" field in the Sales Order Subform (Page 46).

The current implementation introduces functional regressions, especially for extensions relying on in-memory modifications of Sales Line.

Image

The code modification causes the recalculation of all totals in the document; this is an excessive and not necessarily use of logic, that could be reduced only if relevant line fields are changing.

Current behavior

DeltaUpdateTotals is executed before the following check:

if Rec."No." = xRec."No." then 

    exit; 

Causes unnecessary executions even when the Item No. is unchanged.

A new procedure CalculateTotals is invoked:

  • Triggers a full document recalculation
  • Performs record reload from the database

Due to the reload:

  • Any in-memory changes on Sales Line are lost, unless explicitly persisted before validating "Description"

Describe the request

Move at least the following procedures:

DeltaUpdateTotals
CalculateTotals

after:

if Rec."No." = xRec."No." then 

    exit; 

This ensures:

  • Execution only when the Item No. changes
  • Reduced unnecessary recalculations
  • Preservation of in-memory Sales Line modifications

@Andrea-Antolini-EOS

@Thomas-Torggler-EOS
Internal work item: AB#638322

Metadata

Metadata

Assignees

No one assigned

    Labels

    SCMGitHub request for SCM areaextensibility-enhancementNew feature or request related to extensibility

    Type

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions