How I learned about creating surveys and quizzes in Microsoft Forms using Copilot

I have never created a survey or quiz using MS Forms before, thanks to Copilot for quickly showing me how to create quiz by providing a single Prompt and few clicks:

First, sign in https://forms.office.com/ with your credentials, then at the top left click on New Quiz button:

Enter following command: Draft a quiz about Microsoft Forms, then click on Generate button:

Copilot working hard for me 🙂

In about 1-2 minutes, it generated a quiz of 10 questions about MS Forms. Questions and suggested answers with 1 prompt and one click!  Off course you can specify the number of questions in the quiz, but I left the command so simple.  Now that you have the quiz ready you can remove some questions if you like, or even add more, when done click on Keep it button:

Next screen it allows you to edit the questions/answers or regenerate, select theme, once done click on Keep it button:

Click on Collect responses button from the top right corner:

Select Anyone can respond option if you want to make the quiz (or survey) anonymous. One this dialog you can also copy the link to share it with your team or just select the email address or the name of the teams of the group you want to share the quiz (or survey) with:

This is it, quite simple thanks to Copilot!

Just wait and check incoming responses to your quiz (or survey):

Happy Copiloting!

Changing Dynamics 365 “Finance and Operations” Product Core Name

Ever wondered how to change Finance and Operations Product Name?

Simply override ApplicationPlatform – CoreProductName label in 2 steps:
– Create ApplicationPlatform_Extension label file
– Extend CoreProductName label

Create label extension

Create new label file: ApplicationPlatform_Extension

Click Next:

Ensure en-US language is selected then click Next:

Click Next again. The label file should have been created.

Extend Product Label

Double-Click ApplicationPlatform_Extension.en-US.txt to open the label file:

Enter:

Label ID: CoreProductName
Label: <your label>

Save and compile your project or model.

Enable Gmail accounts to access Dynamics 365 SCM Vendor Collaboration Portal

D365 SCM’ Vendor Collaboration portal enables external vendors to access related purchase orders, invoices, consignment inventory, and requests for quotation information.

If you are new to Vendor Collaboration portal, I advise you to start here. This topic discusses how to enable Gmail accounts to access Vendor Collaboration Portal.

Set up and maintain vendor collaboration.

Not all vendors use Microsoft 365 accounts and therefore use their personal email accounts to sign up for and access Vendor Collaboration portal. As you might know this is not supported officially. If you followed steps listed here using Gmail accounts, you will receive this error.

You are not authorized to login with your current credentials

To enable Gmail (or other non-Microsoft accounts) accounts to access Vendor Collaboration portal, you need to sign up to create Microsoft account for these personal accounts. Below I will show you how can achieve that in simple steps:

For Gmail accounts you DO NOT need to invite them to Azure Portal as guest accounts when you create Microsoft account for them.

Skip adding Gmail accounts to Azure Portal

First, in your browser navigate to: https://accounts.microsoft.com

Click on Create account > button.

Signup for Microsoft account

Enter your personal accounts, then click Next button.

Signup for Microsoft accounts

Create password that you can use to access your Microsoft account later (this is different that your personal account password), then click Next button.

Signup for Microsoft account

After this point Microsoft account service should send you verification email including security code you will need to use to verify your personal account.

Verification email

use security code to continue signup process. Click Next button.

Verify email

You will be asked to resolve a puzzle to ensure you are not a robot. Complete it then click Next button.

Enter your Birth date and country, then click Next button.

Enter Birthdate and Country

Verify your birthdate, then click Next button.

Confirm age

you are all set!

Vendor Collaboration portal

Dynamics Folder is missing from Event Viewer after provisioning Dynamics 365 for Finance/SCM version 10.0.29

If you recently provisioned Dynamics 365 Development environment using 10.0.29 release, you will notice Event Viewer is missing Dynamics folder.

Dynamics 365 Development Environment Event Viewer after Provisioning 10.0.29 environment.

After some research I found a solution that is shared by “Daniel Codes” he received from Microsoft Support 3 weeks ago. Find details below:

Dynamics folder missing in event viewer on CHE environment was discovered recently and it is being worked on. We expect the fix to be available some time in close future.

In the meantime, you can use this script to install the ETW Provider (which is what adds the event viewer Dynamics folder) attached with this mail (rename it to PS1 and run it on the VM from c:\temp folder).

Microsoft Support

While waiting on permanent fix from MS execute this PowerShell script in your development environment. Make sure you open PowerShell ISE in Administrator mode, then paste the following script and execute:

$AOSSetupETWManifestDir = "k:\AosService\WebRoot\Monitoring"

foreach ($manifestFile in Get-ChildItem -Path $AOSSetupETWManifestDir\*.man | select-object -Property BaseName,Name)

{
    $dllFile=""

    if ((Test-Path "$AOSSetupETWManifestDir\$($manifestFile.BaseName).Instrumentation.dll")) 

    {
        $dllFile = "$AOSSetupETWManifestDir\$($manifestFile.BaseName).Instrumentation.dll"

    }

    elseif ((Test-Path "$AOSSetupETWManifestDir\$($manifestFile.BaseName)Resource.dll"))

    {

        $dllFile = "$AOSSetupETWManifestDir\$($manifestFile.BaseName)Resource.dll"

    }

    elseif ((Test-Path "$AOSSetupETWManifestDir\$($manifestFile.BaseName).dll")) 

    {

        $dllFile = "$AOSSetupETWManifestDir\$($manifestFile.BaseName).dll" 

    }

    else 

    {

        Write-Host "Warn : Skipping $AOSSetupETWManifestDir\$($manifestFile.Name) as DLL not found"

        Continue    

    }


    Write-Host "Installing $AOSSetupETWManifestDir\$($manifestFile.Name) using $dllFile"

    wevtutil.exe im "$AOSSetupETWManifestDir\$($manifestFile.Name)" /rf:"$dllFile" /mf:"$dllFile"
 

    Write-Host "Finished installing $AOSSetupETWManifestDir\$($manifestFile.Name) `n`n" 

}
Windows PowerShell ISE

Problem solved!

Event Viewer

Dynamics 365 For Finance/SCM Dev Environment and Visual Studio 2019

In this blog I will share with you my first impressions of latest Dynamics 365 for Finance / SCM development environment (version 10.0.28) that I have provisioned recently.

Visual Studio Professional 2019
First and foremost Visual Studio Professional 2019 is the new default development environments (Previously was VS Professional 2017 and before that VS Professional 2015).

I never provisioned D365 10.0.27 Dev environment but I think it is the first version that started using VS 2019.

The Dynamics 365 menu that is used by x++ developers has been moved under Extensions menu:

Dynamics 365 Menu

Update Model Parameters
If you tried updating model parameters (Extensions > Dynamics 365 > Model Management > Update model parameters…) You will notice a new tab (step) called select friend packages.
I looked up Microsoft docs to check related documentation but found nothing about it. So I did some testing myself, the purpose of this step is to allow models referencing a specific model to access its internal artifacts. For example, if you have model X referencing model Y, then model X will appear under select friend packages tab for model Y, when you updat model Y parameters and select model X as a freind package, then model X will be able to access internal methods/classes of Y.

I created 2 models AZ Demo and AZ Demo 2, AZ Demo 2 references AZ Demo. AZ Demo added AZ Demo 2 as friend package. When I open AZ Demo descriptor files I see AZ Demo 2 added under <InternalsVisibleTo> tag.

<?xml version="1.0" encoding="utf-8"?>
<AxModelInfo xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
	<AppliedUpdates xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
	<Customization>Allow</Customization>
	<Description></Description>
	<DisplayName>AZ Demo</DisplayName>
	<Id>896000244</Id>
	<InternalsVisibleTo xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
		<d2p1:string>AZDemo2</d2p1:string>
	</InternalsVisibleTo>
	<Layer>12</Layer>
	<Locked>false</Locked>
	<ModelModule>AZDemo</ModelModule>
	<ModelReferences xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"
		i:nil="true" />
	<ModuleReferences xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
		<d2p1:string>ApplicationFoundation</d2p1:string>
		<d2p1:string>ApplicationPlatform</d2p1:string>
		<d2p1:string>ApplicationSuite</d2p1:string>
		<d2p1:string>FleetManagement</d2p1:string>
	</ModuleReferences>
	<Name>AZDemo</Name>
	<Publisher>AZ</Publisher>
	<SolutionId>00000000-0000-0000-0000-000000000000</SolutionId>
	<VersionBuild>0</VersionBuild>
	<VersionMajor>1</VersionMajor>
	<VersionMinor>0</VersionMinor>
	<VersionRevision>0</VersionRevision>
</AxModelInfo>
Update model parameters

Create new project
in Visual 2019 the create new project dialog has changed, ensure to enter Finance keyword to find the right project template.

Once selected, it will appear under Recent project templates on the left side for the next time you are creating new project:

Create Project

Visual Studio 2019 Debugging Options for D365 Dev Environment
In VS 2019, to debug D365 code you will need to have the correct settings which can be found under: Extensions > Dynamics 365 > Options > Dynamics 365 > Debugging. Under this tab you have the option to select which packages/models you want to include in your debugging, this is newly introduced by Microsoft to speed up debugging process and avoid VS crashes.

Debug items in the solution and items in specific packages. limiting the number of items being debugged provides a better debugging experience > Include Packages:

Debugging D365 Code

As you might know in previous Visual Studio versions you had 1 option to select: “Load symbols only for items in the solution”. if the option is selected, then you can only debug current solution items’ code, if not selected then you can add breakpoint to any artifact under any package/Model.

Dynamics 365 for Finance / SCM Order Labels in label file by ID

After recent development environment upgrade to 10.0.26 release, I noticed when I compile any D365 project containing label file, the label IDs in the file get re-ordered alphabetically. This is a new out of the box feature added by MS probably to enhance fetching labels.

If you want to turn this feature off/on in Visual Studio, Open Options menu by navigating to Dynamics 365 > Options…

D365 Options Menu

Click on Projects tab under Dynamics 365 menu. You will see a new option added:

Order labels in label file by their ID

Projects Options

By default, this option is enabled.

Dev Env: Step 25: GlobalUpdate script for service model: AOSService on machine: #### Failed on Report Deployment

Recently I was looking into cloud-hosted dev environment upgrade issue on Step 25. This step performs 2 main activities:

  • Report Deployment
  • Database Sync

I downloaded execution log file and started investigating Step 25 issue by looking in Step25UpdateReports_############.log under RunbookExecution folder. I noticed multiple reports errored out, I searched by one of the reports names in the log and found this error:

Publish-AXReport : An error occurred while deploying the report BankDepositbyCustomer.Report, PersonnelManagement.
This might be because the SQL Server Reporting Services has not been installed, or is not configured correctly.
At K:\AosService\PackagesLocalDirectory\Plugins\AxReportVmRoleStartupTask\Reporting.psm1:503 char:9 
+      Publish-AXReport -MaxDegreeOfParallelism 1 -ErrorAction Conti …

Something seemed odd with this report, so I searched for the report in Application Explorer and noticed that BankDepositbyCustomer report does not belong to PersonnelManagement model! it belongs to a different model.

Solution: Since the report is not part of PersonnalManagement model, I opened K:\AosService\PackagesLocalDirectory\PersonnalManagement\Reports folder and removed unrelated .rdl files. I repeated the same for couple more models and this did the trick.

Create Sales Packing Slip and set PackingSlipId by code x++ in Dynamics 365 Finance and Operations

To post packing slip using custom PackingSlipId value against sales order and use custom value to set PackingSlipId you will need to follow these steps.

As you know PackingSlipId is set by the system using Number Sequence.

After digging I found a safe way pass custom PackingSlipId value. first, extend SalesFormLetterContract class to accept custom PackingSlipId:

[ExtensionOf(classStr(SalesFormLetterContract))]
final class AZSalesFormLetterContract_extension

private Num AZOverridePackingSlipId;

[DataMemberAttribute]
public Num parmAZOverridePackingSlipId(Num _overridePackingSlipId = AZOverridePackingSlipId)
{
    AZOverridePackingSlipId = _overridePackingSlipId;
    return AZOverridePackingSlipId;
}

Then extend SalesPackingSlipJournalCreate class object to set PackingSlipId

[ExtensionOf(classStr(SalesPackingSlipJournalCreate))]
public final class AZSalesPackingSlipJournalCreate_Extension

/// <summary>
/// Initializes non-correctable fields on the journal header.
/// </summary>
public void initHeader()
{
    next initHeader();

    SalesFormLetterContract contract = this.parmInterCompanyFormletterContract();
       
    if (contract.parmAZOverridePackingSlipId())
    {
        custPackingSlipJour.PackingSlipId = contract.parmAZOverridePackingSlipId();
    }
}

All set!

Now initialize SalesFormLetter object, then get SalesFormLetterContract and pass custom PackingSlipId value:

salesTable = SalesTable::findRecId(1234567890); -- Pass correct SalesTable.RecId
SalesFormLetter_PackingSlip salesFormLetter = SalesFormLetter::construct(DocumentStatus::PackingSlip);
  
SalesFormLetterContract contract = salesFormLetter.getContract();

contract.parmAZOverridePackingSlipId("111999000111");
 // Pass Custom PackingSlipId

salesFormLetter.update(salesTable, DateTimeUtil::getSystemDate(DateTimeUtil::getUserPreferredTimeZone()) , SalesUpdate::DeliverNow, AccountOrder::None, false, false);

Finally, on CustPackingSlipSalesLink table there is unique index that includes following fields: SalesId, DeilveryDate and PackingSlipId. before overriding PackingSlipId with custom value, ensure you are not breaking that index, otherwise you will get an error.

Dynamics 365 for finance & Operations SSRS Report errors and solutions

Issue 1: When you modify SSRS report in Visual Studio, then compile the solution and Deploy report, most of the time when you try executing the report you might get below error:

Serialization version mismatch detect, make sure the runtime dlls are in sync with the deployed metadata. Version of file '27746'. Version of dll '200'.

The solution to fix this error is to compile the entire AX model.

Sometimes you might need to redeploy the report however compiling the model would be sufficient.

Issue 2: SSRS report compilation error:

Deploying rdl files for report AZCustomReport  :
AZCustomReport.Report.rdl
An error occurred while deploying the report AZCustomReport.Report, AZModel.
This might be because the SQL Server Reporting Services has not been installed, or is not configured correctly.
System.Web.Services.Protocols.SoapException: The number of defined parameters is not equal to the number of cell definitions in the parameter panel.
at Microsoft.ReportingServices.Library.ReportingService2005Impl.CreateReport(String Report, String Parent, Boolean Overwrite, Byte[] Definition, Property[] Properties, Guid batchId, Warning[]& Warnings)
at Microsoft.ReportingServices.WebServer.ReportingService2005.CreateReport(String Report, String Parent, Boolean Overwrite, Byte[] Definition, Property[] Properties, Warning[]& Warnings)
Deploying rdl files for report AZCustomReport failed.

The solution to fix this issue, is to check Report datasource Parameters, since I am modifying the report, I would right click the report added to the solution, then choose compare with latest version. If there are extra parameters added but they are not supposed to be on the report, remove them by editing the report xml file. If there are missing parameters, then add them.

SSRS Report Parameters

Issue 3: Newly added fields to the report are now showing when I run the report.

The Solution is to remove these fields from the report, then add them back. Compile and Deploy report.

How to read text file in Dynamics 365 F&O

Using System.IO.Stream library you can read text files. here is a runnable class to load the file using FileUploadBuild control, then read its content:

class AZTxtFileRead
{
/// /// Runs the class with the specified arguments. ///
/// The specified arguments.
public static void main(Args _args)
{
#File;
    
    System.IO.Stream            stream;
    FileUploadBuild             fileUpload;
    DialogGroup                 dlgUploadGroup;
    FileUploadBuild             fileUploadBuild;
    FormBuildControl            formBuildControl;
    Dialog                      dialog = new Dialog("Import the data from File");

    dlgUploadGroup          = dialog.addGroup("@SYS54759");
    formBuildControl        = dialog.formBuildDesign().control(dlgUploadGroup.name());
    fileUploadBuild         = formBuildControl.addControlEx(classstr(FileUpload), 'Upload');
    fileUploadBuild.style(FileUploadStyle::MinimalWithFilename);
    fileUploadBuild.fileTypesAccepted('.txt');

    if (dialog.run() && dialog.closedOk())
    {
        FileUpload fileUploadControl     = dialog.formRun().control(dialog.formRun().controlId('Upload'));
        FileUploadTemporaryStorageResult fileUploadResult = fileUploadControl.getFileUploadResult();

        if (fileUploadResult && fileUploadResult.getUploadStatus())
        {
            CommaTextStreamIo textStream = CommaTextStreamIo::constructForRead(File::UseFileFromURL(fileUploadResult.getDownloadUrl()));

            textStream.inFieldDelimiter(',');
            textStream.inRecordDelimiter(#delimiterCRLF);

            // First line might have header information
            container currentLine = textStream.read(); 

            while(currentLine)
            {

                info(strFmt("%1, %2, %3", 
                    conPeek(currentLine, 1),
                    conPeek(currentLine, 2),
                    conPeek(currentLine, 3)));

                currentLine = textStream.read();

            }
        }

    }
}
}