mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-08-06 09:26:52 +01:00
Add lifecycle error and privacy knowledge (#99)
* Add lifecycle error and privacy knowledge Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 95c06ad8-377d-4faa-8d07-06300b1c81ec * Fix lifecycle privacy review findings Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: a26cd6d6-ff49-433e-bc53-f645c455ebdd * Refine lifecycle privacy retrieval Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 95c06ad8-377d-4faa-8d07-06300b1c81ec * Make review gates explicit Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 95c06ad8-377d-4faa-8d07-06300b1c81ec --------- Co-authored-by: Jesper Schulz-Wedde <jesper.schulzwedde@microsoft.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
363f08f47e
commit
e0ebdd35c7
25 changed files with 459 additions and 39 deletions
|
|
@ -0,0 +1,32 @@
|
|||
codeunit 50303 "Upgrade Phases Bad"
|
||||
{
|
||||
Subtype = Upgrade;
|
||||
|
||||
trigger OnCheckPreconditionsPerCompany()
|
||||
begin
|
||||
// A precondition check must not repair the data it is checking.
|
||||
RenamePostingGroup();
|
||||
end;
|
||||
|
||||
trigger OnValidateUpgradePerCompany()
|
||||
begin
|
||||
// Validation must not perform a migration omitted from OnUpgrade.
|
||||
MigrateCustomerPostingGroups();
|
||||
end;
|
||||
|
||||
local procedure RenamePostingGroup()
|
||||
var
|
||||
CustomerPostingGroup: Record "Customer Posting Group";
|
||||
begin
|
||||
if CustomerPostingGroup.Get('OLD') then
|
||||
CustomerPostingGroup.Rename('NEW');
|
||||
end;
|
||||
|
||||
local procedure MigrateCustomerPostingGroups()
|
||||
var
|
||||
Customer: Record Customer;
|
||||
begin
|
||||
Customer.SetRange("Customer Posting Group", 'OLD');
|
||||
Customer.ModifyAll("Customer Posting Group", 'NEW');
|
||||
end;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue