Skip to main content

Posts

Please upvote this idea for Visual Studio for Dynamics 365fo/scm

" When ISV solutions are installed as binary only, the current development tools does not support displaying delegate methods, and there are no interaction to copy the enventhandler method. Please add the Option to see the class in design view and from here se and copy event handler methods, Or display them directly from the Application explorer and make the interaction here. " Please vote: https://experience.dynamics.com/ideas/idea/?ideaid=a5d9dd10-a651-ec11-a3ee-0003ff459fb2

ProcessGuide framework

I was tasked with developing a custom "process" for printing ad hoc labels in the Dynamics 365SCM WHS app. WHS process guide - development docs Reading the great articles from 1clickfactory (starting point  https://www.1clickfactory.com/blog/advanced-whs-mobile-device-development-part-1-process-guide-framework/) gives a good starting point. Especially Edgaras' tip on running  SysExtensionCache::clearAllScopes();  in a runnable class after introducing a new step/pagebuilder class combination  is VERY useful. And of course Microsoft's own documentation ( https://docs.microsoft.com/en-us/dynamics365/supply-chain/warehousing/process-guide-framework ) also helps. However, I wanted to chip in with a couple of things. Extending WHS base enums If you extend the WHSActivity, WHSWorkExecuteMode or WHSWorktransType base enums with new options it is a good idea to run a database synchronization when you are done with extending them. Otherwise you might be frustrated to find, th...

Suppressing the infolog

Supressing the infolog is often useful in D365FO when augmenting code. When augmenting code using COC (Chain Of Command), you can have new code run either before or after the code you are augmenting. This means that any infolog-messages that the standard application code does, will be shown to the user, even if your augmentation supports a scenario where there must be no infolog-messages. How do you avoid the standard application infolog-messages ? To the rescue comes temporary supression of the infolog. The suppression consists of: 1) Saving the current infologLevel 2) Setting the infologLevel to SysInfologLevel::None 3) Run your code 4) Restoring the saved infologLevel to the infolog For example a table could have a validatewrite-method that validates that you are only allowed to use 3 out of 6 options in an enum-field, and you need to allow for a fourth one. Table a - validateWrite method: boolean validateWrite() {     Switch (this.enumField)     {     ...

Be careful - only do extensions of a table, that actually contains augmentation.

 Note to self. Be careful of creating extensions to a table, that contains no augmentation. I experience problems when opening the Released Products Forms on my developer box. I got a run-time error " Object reference not set to an instance of an object"  when opening the form. The error also occurred when changing records in the form, BUT strangely enough ONLY the first time the cursor arrived a at record. The second there was no problem.  Researching a bit with the debugger, I could see that the error occurred at the super() call in the FormRun class, and in the active method on the EcoResProduct datasource. I discovered that I by accident had created an extension to the table EcoResProduct that contained NO augmentation what so ever. Double checking that the extension had not been checked in to azure DEVOPS, and that the xml-file for the table extension in  K:\AosService\PackagesLocalDirectory\xxxxxDev\xxxxxDev\AxTableExtension contained no augmentation, I deleted...

SSRS - D365 FO SAT-box annoyance

WHY oh WHY, does the developer-box not tell you, that you can not use custom code in an SSRS-report ? Working with a SSRS-report on Dynamics 365 FO, I came across the following annoyance, with Microsofts setup virtual boxes in Azure. I was working with getting the report to present the filters and chosen parameters from the report dialog that the user is running the report with. At some stage, I thought making a function with custom code in the report properties, was the way to go, but I abandoned that approach in favour of another - AND forgot all about the code. This meant that the custom coded was checked into dev.azure.com, and included in the build on the build box. So I got the deployable package and uploaded it into asset library in LCS, and applied to the SAT-environment. No worries. Right until the users started tested the report in the SAT-environment, because they got: So this meant going back to the dev-box, cleaning out the custom code, doing the building and appl...

Dynamics ax 2012 SSRS reports RDP Changing Query

I have used a bit of time this morning trying to figure out how to change the query in an RDP based SSRS report. I needed to change the report from using a query JmgPaySpecification to using the query JmgPaySpecificationExt instead. I started out by changing the     SRSReportQueryAttribute(queryStr(JmgPaySpecificationExt)) attribute in the classdeclaration of the RDP class and compiling it. Then I went to Visual Studio, opened the report and doing a rebuild on it to get it refreshed in the AOT. However that didn't seem to change anything, and doing a find on the SSRS-report searching all nodes and searching for JmgPaySpecification revealed: So doing the above changed nothing. The solution is, to go into Visual Studio opening the report: 1. Go to Datasets and highlight the Dataset 2. Change the Data Source Type from Report Data Provider type to Query.     This clears the Query setup. 3. Change the Data source Type back to Report Da...

Quickly setting up what the status bar will show for your user.

When documenting test or setup it is advantageous to show as many values in the status bar as possible (especially the AOS name and company accounts id and maybe date and time), to be able to show in screen dumps what environment you are using. Here is a quick little job for setting up ALL fields to be shown in the status bar. Dynamics AX 2009: static void Job130(Args _args) {     #LOCALMACRO.FLAG_StatusLineHelpText             (1 << 0) #ENDMACRO     #LOCALMACRO.FLAG_StatuslineDatabase             (1 << 1) #ENDMACRO     #LOCALMACRO.FLAG_StatuslineWatch                (1 << 2) #ENDMACRO     #LOCALMACRO.FLAG_StatuslineNumLock              (1 << 3) #ENDMACRO     #LOCALMACRO.FLAG_StatuslineCapsLock             (1 << 4) #ENDMACRO   ...