Skip to content

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ codeunit 5416 "Create Salesperson/Purchaser"
ContosoCRM: Codeunit "Contoso CRM";
ContosoUtilities: Codeunit "Contoso Utilities";
begin
ContosoCRM.InsertSalespersonPurchaser(BenjaminChiu(), BenjaminChiuLbl, 0, ContosoUtilities.EmptyPicture(), 'BC@contoso.com');
ContosoCRM.InsertSalespersonPurchaser(BenjaminChiu(), BenjaminChiuLbl, 3, ContosoUtilities.EmptyPicture(), 'BC@contoso.com');
ContosoCRM.InsertSalespersonPurchaser(EsterHenderson(), EsterHendersonLbl, 0, ContosoUtilities.EmptyPicture(), 'EH@contoso.com');
ContosoCRM.InsertSalespersonPurchaser(HelenaRay(), HelenaRayLbl, 0, ContosoUtilities.EmptyPicture(), 'HR@contoso.com');
ContosoCRM.InsertSalespersonPurchaser(JimOlive(), JimOliveLbl, 5, ContosoUtilities.EmptyPicture(), 'JO@contoso.com');
ContosoCRM.InsertSalespersonPurchaser(LinaTownsend(), LinaTownsendLbl, 5, ContosoUtilities.EmptyPicture(), 'LT@contoso.com');
ContosoCRM.InsertSalespersonPurchaser(OtisFalls(), OtisFallsLbl, 5, ContosoUtilities.EmptyPicture(), 'OF@contoso.com');
ContosoCRM.InsertSalespersonPurchaser(RobinBettencourt(), RobinBettencourtLbl, 0, ContosoUtilities.EmptyPicture(), 'RB@contoso.com');
ContosoCRM.InsertSalespersonPurchaser(RobinBettencourt(), RobinBettencourtLbl, 2, ContosoUtilities.EmptyPicture(), 'RB@contoso.com');
end;

procedure BenjaminChiu(): Code[20]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// ------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// ------------------------------------------------------------------------------------------------

namespace Microsoft.DemoData.Purchases;

using Microsoft.DemoTool.Helpers;

codeunit 5392 "Create Return Reason"
{
InherentEntitlements = X;
InherentPermissions = X;

trigger OnRun()
var
ContosoPurchase: Codeunit "Contoso Purchase";
begin
ContosoPurchase.InsertReturnReason(Damaged(), DamageDescriptionLbl);
ContosoPurchase.InsertReturnReason(WrongItem(), WrongItemDescriptionLbl);
ContosoPurchase.InsertReturnReason(WrongSize(), WrongSizeDescriptionLbl);
ContosoPurchase.InsertReturnReason(WrongColor(), WrongColorDescriptionLbl);
end;

procedure Damaged(): Code[10]
begin
exit(DamagedTok);
end;

procedure WrongItem(): Code[10]
begin
exit(ItemTok);
end;

procedure WrongSize(): Code[10]
begin
exit(SizeTok);
end;

procedure WrongColor(): Code[10]
begin
exit(ColorTok);
end;

var
ColorTok: Label 'COLOR', MaxLength = 10;
DamageDescriptionLbl: Label 'Damaged or defective', MaxLength = 50;
DamagedTok: Label 'DAMAGED', MaxLength = 10;
ItemTok: Label 'ITEM', MaxLength = 10;
SizeTok: Label 'SIZE', MaxLength = 10;
WrongColorDescriptionLbl: Label 'Wrong color', MaxLength = 50;
WrongItemDescriptionLbl: Label 'Wrong item', MaxLength = 50;
WrongSizeDescriptionLbl: Label 'Wrong size', MaxLength = 50;
}
Loading