Saturday, August 22, 2020

New Feature to aggregate data on the new grid component

From 10.0.9 release of Dynamics 365 FO, there are some new features really interesting for users to setup data based on grid componant.

- (Preview) Grouping in grids : allows users to group data within grids. This empowers users to analyze data and calculate subtotals per group. Grouping can be saved as part of the saved view definition when the saved views feature is enabled.

- (Preview) New grid control : faster rendering, smoother scrolling, and less jumping when navigating in the grid. The new grid also allows drag-and-drop column reordering, entry of mathematical expressions in numeric cells, the ability to calculate totals at the bottom of numeric columns, and the ability to get ahead of the system when editing or creating data.

- (Preview) Saved views : enables saved views, which is a significant enhancement to the personalization subsystem. This feature allows users to have multiple named sets of personalizations per page. Views can also be published to security roles and legal entities.

Let's see the result :

Grouping


Total


Final result


Grouping :https://docs.microsoft.com/en-us/dynamics365-release-plan/2020wave1/finance-operations-crossapp-capabilities/grouping-subtotals-grids


Remark : This feature should be enable after the new grid componant feature (dependancy).


The save view :

Save your current view (filtering, grouping, order of columns) by clicking on the Standard view button. Save your view with a name.



With the new grid componant, you could by drag and drop, change the order of column easily. When your changes are done, a star appears on your view name.

You can also publish your view by clicking on the three dots on the popup of the view name

As you can see, a lot of option are available on the publishing context setup (company, roles)


Administrators could retrieve the view from this feature on System administration module > Setup > Personalization



Wednesday, February 6, 2019

MetadataSearch vs NotePad++ for Dynamics 365 FO technical search

 I'm very fan of the famous and old tool NotePad++. It is a powerful tool, simple and free with a lot of feature. I'm sure there is better, but what is really interesting for me on NotePad++ is :


Portable edition available for using it on server without any issue

Plugin a portable also

I can use Regex on NotePad++.

I usually search standard code to implement custom code on Dynamics 365FO, to be sure to not reimplement something, take the right pattern or jsut to see new pattern of code from Microsoft and align technical design of them (hate to start from scratch something).

So 2 way to achieve search of code on D365FO solution :

Metadatasearch : Feature available on Visual Studio from the Dynamics 365 button

Here is the link of Microsoft and nothing miore to say about it (maybe, it could be interesting to have more sample of search...) 

https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/dev-tools/metadata-search-visual-studio

Pro's : 

- Integrated

- you can type object your search

Con's :

- Slow

- You can't save your result

- Too dynamics > When you search something, result are searching. So if you don't know exactly what you are searching (sort of pattern or multiple search), not really easy.

NotePad++ :

By searching in a directory, filtering on XML files, we can achieve the same goal as Metadatasearch and increase it by the regex use

For instance, if you miss how to implement a particular Event Handler with XppPrePostArgs parameter :


If you should to find in the code something with OR criteria : Suing the "|" for work item, comment in the code




For name of object search, you can use Regex directly in the application Explorer !




Wednesday, October 4, 2017

How to synchronize manually database and model on Dynamics 365 for Operations

Hi everyone,

Today, another tips to help you synchonize manually some objets between models and your database (Table, Type, Views, Entities ...)

Visual Studio uses actually a command to do this job on each process of synchronization from IDE (on Visual Project contextual menu for example or in the Dynamics 365 Menu).

To use this command ourself, we need to know it !
Type C:\AosService\PackagesLocalDirectory\Bin\SyncEngine.exe /? in a command prompt and you could see command options


Usage: 

SyncEngine -option=[value]
-metadatabinaries   Specify the metadata provider path
-binfolder   Specify the location of the bin folder
-metadatafolder   Specify the location of the metadata
-connect   Specify the business database connection string
-syncmode   Specify the sync mode. Supported mode: {fullall | initialschema | fullsecurity | fullids | fulltablesandviews | partiallist | drop | drop,partiallist | partialsecurity | partiallist,partialsecurity}
-synclist   Specify list of tables or views that need be synced
-droplist   Specify list of tables or views that need be dropped
-rolelist   Specify list of roles that need be synced
-roleExtensionlist   Specify list of role extensions that need be synced
-dutylist   Specify list of duties that need be synced
-dutyExtensionlist   Specify list of dutie extensions that need be synced
-privilegelist   Specify list of privilegs that need be synced
-policylist   Specify list of security policies that need be synced
-droproles   Specify list of security roles that need be dropped
-droproleextensions   Specify list of security role extensions that need be dropped
-dropduties   Specify list of security duties that need be dropped
-dropdutyextensions   Specify list of security duty extensions that need be dropped
-dropprivileges   Specify list of security privileges that need be dropped
-droppolicies   Specify list of security policies that need be dropped
-midisplaylist   Specify list of display menu items that was changed for the table permission synchronization
-miactionlist   Specify list of action menu items that was changed for the table permission synchronization
-mioutputlist   Specify list of output menu items that was changed for the table permission synchronization
-formlist   Specify list of forms that was changed for the table permission synchronization
-reportlist   Specify list of reports that was changed for the table permission synchronization
-sqltimeout   Specify Sql Command timeout in minutes
-verbosity   Specify logging verbosity level. Supported level: {Normal | Diagnostic}
-ignoreIndexList   Specify list of table with index that need to be ignored during Sync. The Expected format : {TableA.IndexA, TableB.IndexB}


Some examples of the command :
Usual command for a full compil :


C:\AosService\PackagesLocalDirectory\bin\syncengine.exe -syncmode="fullall" -metadatabinaries="C:\AosService\PackagesLocalDirectory" -connect="Data Source=localhost;Initial Catalog=AxDataBase;Integrated Security=True;Enlist=True;Application Name=AXVSSDK" -verbosity="Minimal"


Command for a partial compil of object's list (here just the CustCustomerEntity)


C:\AosService\PackagesLocalDirectory\Bin\SyncEngine.exe -syncmode="partiallist" -metadatabinaries=C:\AosService\PackagesLocalDirectory -connect="Data Source=AxServer.database.windows.net;User ID=admin@AxServer.database.windows.net;Password=xxxxxxxxx;Initial Catalog=DataBaseName;Integrated Security=false;Enlist=True;Application Name=SyncEngine" -verbosity="Diagnostic" -synclist="CustCustomerEntity"






Monday, October 2, 2017

Duplicates ID on two models in Dynamics 365 for operations

Hi everyone,

Today, I would like to speak about Ids issue during environment update with Microsoft KBs.
I don't know if this solution is a best practice, but it works, and that's all I wanted at this time.

Update process contains two main steps : Preparation and installation.
During installation process, the system could notice you of a duplicate Id issue because a package (a custom!) has the same Id as a new one, present in the update.

In this case, you could : Export all code of your package, uninstall it, install the new standard package with the famous reserved Id, then create a new custom package for your customization and import your code in.
It's a bummer like the "Dude" will say, isn't it ? :)

So the shortest way could be : Stop IIS, edit descriptor of your custom package, change the ID, save and start IIS. Just to be safe, you could open Visual and compil all your application.

Launch a new installation of your previous preparation update, and Duplicate Ids issue will in theory vanish.

Happy Dynamics update!

Monday, July 31, 2017

How to deploy SSRS reports manually

Hi everyone,

Today a new tips to deploy SSRS Report on Dynamics 365 For Operations.
The new ERP release use automatic deployment features from LifeCycle Services, with packages.

To deploy some reports manually, you could use 2 powershell scripts available on Dynamics 365 for operations Virtual Machine :

With a powershell (run as administrator), execute the command
"Set-ExecutionPolicy Unrestricted", then call :

For Local environment
C:\Packages\Plugins\AxReportStartVmRoleStartupTask\DeployAllReportsToSSRS.ps1
For Azure environment

C:\AosService\PackagesLocalDirectory\Plugins\AxReportVmRoleStartupTask\DeployAllReportsToSSRS.ps1 -PackageInstallLocation “C:\AosService\PackagesLocalDirectory”

Adapt drive letter of each command (J: or something else)

Tuesday, June 6, 2017

Tips : How to override super call by event Handler

Hi everyone,

Today, just a tips, maybe usefull for someone (I hope).

With Dynamics 365 for operations, developer used to implement Event Handler method, based on standard code.
Sometimes, it would be interesting to override the super of the event handler caller, if we want to cancel for example the process in an iteration.

That's possible by a simple way, too little documented in my opinion.

Here a sample of code :

Source


    /// 
    ///Override the create method logic
    /// 
    /// 
    /// 
    [FormDataSourceEventHandler(formDataSourceStr(SalesTable, SalesTable), FormDataSourceEventType::Creating)]
    public static void SalesTable_OnCreating(FormDataSource sender, FormDataSourceEventArgs e)
    {
        FormDataSourceCancelEventArgs ce = e as FormDataSourceCancelEventArgs;

        ce.cancel(true); // remove the super call

    }