Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions Apps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,31 @@ Modules have the following properties:
<p align=center>
<span>
<img width=41 height=40
src="https://cloudblogs.microsoft.com/uploads/prod/sites/4/2019/08/image015.png">
src="https://cloudblogs.microsoft.com/dynamics365/wp-content/uploads/sites/4/2019/08/image015.png">
</span>
</p>
</td>
<td width=160'>
<p align=center>
<span>
<img width=52 height=35
src="https://cloudblogs.microsoft.com/uploads/prod/sites/4/2019/08/image016.png">
src="https://cloudblogs.microsoft.com/dynamics365/wp-content/uploads/sites/4/2019/08/image016.png">
</span>
</p>
</td>
<td width=160>
<p align=center>
<span>
<img width=44 height=42
src="https://cloudblogs.microsoft.com/uploads/prod/sites/4/2019/08/image017.jpg">
src="https://cloudblogs.microsoft.com/dynamics365/wp-content/uploads/sites/4/2019/08/image017.jpg">
</span>
</p>
</td>
<td width=160>
<p align=center>
<span >
<img width=48 height=48
src="https://cloudblogs.microsoft.com/uploads/prod/sites/4/2019/08/image019.png">
src="https://cloudblogs.microsoft.com/dynamics365/wp-content/uploads/sites/4/2019/08/image019.png">
</span>
</p>
</td>
Expand Down Expand Up @@ -64,31 +64,31 @@ Modules have the following properties:
<p align=center>
<span >
<img width=55 height=27
src="https://cloudblogs.microsoft.com/uploads/prod/sites/4/2019/08/image020.png">
src="https://cloudblogs.microsoft.com/dynamics365/wp-content/uploads/sites/4/2019/08/image020.png">
</span>
</p>
</td>
<td width=160>
<p align=center>
<span >
<img width=60 height=61
src="https://cloudblogs.microsoft.com/uploads/prod/sites/4/2019/08/image021.jpg">
src="https://cloudblogs.microsoft.com/dynamics365/wp-content/uploads/sites/4/2019/08/image021.jpg">
</span>
</p>
</td>
<td width=160>
<p align=center>
<span >
<img width=61 height=61
src="https://cloudblogs.microsoft.com/uploads/prod/sites/4/2019/08/image022.jpg">
src="https://cloudblogs.microsoft.com/dynamics365/wp-content/uploads/sites/4/2019/08/image022.jpg">
</span>
</p>
</td>
<td width=160>
<p align=center>
<span >
<img width=73 height=41
src="https://cloudblogs.microsoft.com/uploads/prod/sites/4/2019/08/image023.png">
src="https://cloudblogs.microsoft.com/dynamics365/wp-content/uploads/sites/4/2019/08/image023.png">
</span>
</p>
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ codeunit 132594 "Guided Experience Test"
PermissionsMock: Codeunit "Permissions Mock";
Any: Codeunit Any;
GuidedExperienceTestLibrary: Codeunit "Guided Experience Test Library";
GuidedExperienceRecordCountErr: Label 'Guided Experience record count error.';

[Test]
[Scope('OnPrem')]
Expand Down Expand Up @@ -875,6 +876,58 @@ codeunit 132594 "Guided Experience Test"
Assert.AreEqual(4, SpotlightTourText.Count, 'The spotlight tour texts have incorrect keys.');
end;

[Test]
[Scope('OnPrem')]
procedure TestGuidedExperienceDoNotShowDuplicateRecordForSameCombination()
var
GuidedExperienceItem: Record "Guided Experience Item";
TempGuidedExperienceItem: Record "Guided Experience Item" temporary;
GuidedExperienceImpl: Codeunit "Guided Experience Impl.";
GuidedExperienceType: Enum "Guided Experience Type";
ManualSetupCategory: Enum "Manual Setup Category";
ObjectTypeToRun1: ObjectType;
ObjectTypeToRun2: ObjectType;
ObjectIDToRun1: Integer;
ObjectIDToRun2: Integer;
Title1: Text[2048];
Title2: Text[2048];
ShortTitle1: Text[50];
ShortTitle2: Text[50];
Description1: Text[1024];
Description2: Text[1024];
Keywords: Text[250];
ExpectedDuration: Integer;
begin
// [SCENARIO 467947] Numerous Sales and Inventory Forecast Entries appear in Manual Setup.
PermissionsMock.Set('Guided Exp Edit');

// [GIVEN] The Guided Experience Item table contains 2 manual setups
GuidedExperienceItem.DeleteAll();

// [GIVEN] Define ObjectType, Object ID and Manual Setup Category
ObjectTypeToRun1 := ObjectType::Codeunit;
ObjectIDToRun1 := Codeunit::"Checklist Test Codeunit";
ManualSetupCategory := ManualSetupCategory::Uncategorized;

// [GIVEN] Insert Manual Setup
GuidedExperienceTestLibrary.InsertManualSetup(true, Title1, ShortTitle1, Description1, ExpectedDuration,
ObjectTypeToRun1, ObjectIDToRun1, ManualSetupCategory, Keywords);

// [GIVEN] Define ObjectType and Object ID
ObjectTypeToRun2 := ObjectType::Codeunit;
ObjectIDToRun2 := Codeunit::"Checklist Test Codeunit";

// [GIVEN] Insert Manual Setup with same detail
GuidedExperienceTestLibrary.InsertManualSetup(true, Title2, ShortTitle2, Description2, ExpectedDuration,
ObjectTypeToRun2, ObjectIDToRun2, ManualSetupCategory, Keywords);

// [WHEN] Create Page to view Manual setup entry by Temporary Guided Experience Item table
GuidedExperienceImpl.GetContentForSetupPage(TempGuidedExperienceItem, GuidedExperienceType::"Manual Setup");

// [THEN] Temporary Guided Experience Item table contains exactly 1 records
Assert.AreEqual(1, TempGuidedExperienceItem.Count, GuidedExperienceRecordCountErr);
end;

local procedure VerifyGuidedExperienceItemFields(GuidedExperienceItem: Record "Guided Experience Item"; Code: Code[300]; Version: Integer; ObjectTypeToRun: Enum "Guided Experience Object Type"; ObjectID: Integer; Link: Text[250]; Title: Text[2048]; ShortTitle: Text[2048]; Description: Text[1024]; ExpectedDuration: Integer; Completed: Boolean; GuidedExperienceType: Enum "Guided Experience Type"; AssistedSetupGroup: Enum "Assisted Setup Group"; HelpUrl: Text[250]; VideoUrl: Text[250]; VideoCategory: Enum "Video Category"; ManualSetupCategory: Enum "Manual Setup Category"; Keywords: Text[250]; SpotlightTourType: Enum "Spotlight Tour Type"; SpotlightTourTexts: Dictionary of [Enum "Spotlight Tour Text", Text])
begin
Assert.AreEqual(Code, GuidedExperienceItem.Code, 'The Code field of the Guided Experience Item is incorrect.');
Expand Down
9 changes: 9 additions & 0 deletions Apps/System/Azure Function/AzureFunctionsResponse.Codeunit.al
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@ codeunit 7805 "Azure Functions Response"
exit(ResponseMessage.ReasonPhrase);
end;

/// <summary>
/// Gets the error content
/// </summary>
/// <returns>Text representation of the detailed error message.</returns>
procedure GetError(var ErrorContent: Text)
begin
ResponseMessage.Content.ReadAs(ErrorContent);
end;

internal procedure SetError(Error: Text)
begin
ResponseError := Error;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ codeunit 1991 "Guided Experience Impl."
begin
GuidedExperienceItem.CopyFilters(GuidedExperienceItemTemp);
GuidedExperienceItemTemp.Reset();
GuidedExperienceItem.SetCurrentKey("Guided Experience Type", "Object Type to Run", "Object ID to Run", Link, Version);
GuidedExperienceItem.SetCurrentKey("Guided Experience Type", "Object Type to Run", "Object ID to Run", "Manual Setup Category", Link, Version);
GuidedExperienceItem.SetRange("Guided Experience Type", GuidedExperienceItem."Guided Experience Type"::"Assisted Setup");
GuidedExperienceItem.SetAscending(Version, false);

Expand Down Expand Up @@ -519,7 +519,7 @@ codeunit 1991 "Guided Experience Impl."
var
GuidedExperienceItem: Record "Guided Experience Item";
begin
GuidedExperienceItem.SetCurrentKey("Guided Experience Type", "Object Type to Run", "Object ID to Run", Link, Version);
GuidedExperienceItem.SetCurrentKey("Guided Experience Type", "Object Type to Run", "Object ID to Run", "Manual Setup Category", Link, Version);
GuidedExperienceItem.SetAscending(Version, false);

GuidedExperienceItem.SetRange("Guided Experience Type", GuidedExperienceType);
Expand All @@ -545,12 +545,17 @@ codeunit 1991 "Guided Experience Impl."
(GuidedExperienceItem."Guided Experience Type" = PrevGuidedExperienceItem."Guided Experience Type")
then
if (GuidedExperienceItem."Title" <> PrevGuidedExperienceItem."Title")
or (GuidedExperienceItem.Description <> PrevGuidedExperienceItem.Description)
or (GuidedExperienceItem."Video Url" <> PrevGuidedExperienceItem."Video Url")
or (GuidedExperienceItem."Video Category" <> PrevGuidedExperienceItem."Video Category")
then
or (GuidedExperienceItem.Description <> PrevGuidedExperienceItem.Description)
or (GuidedExperienceItem."Video Url" <> PrevGuidedExperienceItem."Video Url")
or (GuidedExperienceItem."Video Category" <> PrevGuidedExperienceItem."Video Category")
then
InsertItem := true;

if (GuidedExperienceItem."Guided Experience Type" = GuidedExperienceItem."Guided Experience Type"::"Manual Setup") and
(GuidedExperienceItem."Manual Setup Category" <> PrevGuidedExperienceItem."Manual Setup Category")
then
InsertItem := true;

if InsertItem then begin
InsertGuidedExperienceItemIfValid(GuidedExperienceItemTemp, GuidedExperienceItem);
InsertItem := false;
Expand Down
4 changes: 3 additions & 1 deletion Apps/System/Image/src/ImageImpl.Codeunit.al
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,10 @@ codeunit 3970 "Image Impl."
var
Image: DotNet Image;
Size, Width, Height : Integer;
MaxSize: Integer;
begin
if TempBlob.Length() > 5000000 then begin
MaxSize := 5242880; // 5MB
if TempBlob.Length() > MaxSize then begin
Session.LogMessage('0000FMA', StrSubstNo(ImageTooLargeTxt, TempBlob.Length()), Verbosity::Normal, DataClassification::SystemMetadata, TelemetryScope::ExtensionPublisher, 'Category', ImageCatTxt);
System.Clear(TempBlob);
Error(ImageTooLargeErr);
Expand Down
2 changes: 1 addition & 1 deletion Apps/System/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

The System Application is the interface to the Business Central platform and cloud ecosystem. Currently, the collection of system application modules looks as follows:

<img src="https://cloudblogs.microsoft.com/uploads/prod/sites/4/2019/08/image025.png">
<img src="https://cloudblogs.microsoft.com/dynamics365/wp-content/uploads/sites/4/2019/08/image025.png">