Skip to content

Conversation

@dayland
Copy link
Contributor

@dayland dayland commented Oct 29, 2025

This pull request refactors the handling of explanation text and activity log entries in the UpdateMissingLineValuesFromHistory procedures within the codeunit 6120 "E-Doc. Purchase Hist. Mapping". The main focus is on simplifying the explanation text management and ensuring that activity logs are consistently marked as AI-generated. Below are the most important changes grouped by theme:

Refactoring of Explanation Text Handling:

  • Removed the overloaded UpdateMissingLineValuesFromHistory procedure that accepted a history record, consolidating logic to use the version that works directly with PurchInvLine. This reduces redundancy and simplifies the update process.
  • Changed the CustomExplanationTxt parameter to ExplanationTxt and removed the logic for selecting between a default and custom explanation, making the explanation text usage more straightforward.

Activity Log Improvements:

  • Updated calls to SetActivityLog to use the unified ExplanationTxt parameter, ensuring consistent logging of explanations for field updates. [1] [2]
  • Added .SetType(Enum::"Activity Log Type"::"AI") to activity log creation, explicitly marking these logs as AI-generated for better traceability.

Fixes AB#611426

…type

- Remove overload that accepted E-Doc. Purchase Line History (no longer sets the draft's history id or telemetry).
- Use a single UpdateMissingLineValuesFromHistory signature with an explicit ExplanationTxt parameter and stop merging with a default explanation.
- Ensure Activity Log builder explicitly sets the Activity Log Type (AI).
@dayland dayland requested a review from a team as a code owner October 29, 2025 11:24
@github-actions github-actions bot added the AL: Apps (W1) Add-on apps for W1 label Oct 29, 2025
@github-actions github-actions bot modified the milestone: Version 28.0 Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AL: Apps (W1) Add-on apps for W1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants