07 April 2017

D365 | Instrall Platform Update 5 on local DEV VM

Lately I managed to install platform update 5 in my development machine. It was easier than platform update 4. Here are the steps to follow
You don't need to change the config files anymore :)

  • Download platform update 5 from LCS (for details see the PU4 post)
  • Unblock the zip and extract it
  • Open a command prompt and navigate to the folder
    • AXUpdateInstaller.exe generate -runbookid="OneBoxDev" -topologyfile="DefaultTopologyData.xml" -servicemodelfile="DefaultServiceModelData.xml" -runbookfile="OneBoxDev-runbook.xml" 
    • AXUpdateInstaller.exe import -runbookfile=OneBoxDev-runbook.xml
    • AXUpdateInstaller.exe execute -runbookid=OneBoxDev
  • If the installations stops at step 5 - restart the server and continue
    • AXUpdateInstaller.exe execute -runbookid=OneBoxDev -rerunstep=5
  • rebuild your application
  • update VS extensions (for details see the PU4 post)
    • from to
  • Regenerate form adaptor models 
    • cd C:\AOSService\PackagesLocalDirectory\Bin • xppfagen.exe -metadata=C:\AosService\PackagesLocalDirectory -model="ApplicationPlatformFormAdaptor" -xmllog="c:\temp\log1.xml" 
    • xppfagen.exe -metadata=C:\AosService\PackagesLocalDirectory -model="ApplicationFoundationFormAdaptor" -xmllog="c:\temp\log2.xml"
    • xppfagen.exe -metadata=C:\AosService\PackagesLocalDirectory -model="DirectoryFormAdaptor" -xmllog="c:\temp\log3.xml"
finally you will see the new version in the about page: Update5 (7.0.4475.16165)

And all NoYes controls look pretty now

03 April 2017

D365fO | change view edit mode of a form

To switch between view and edit mode of an AX form we used element.task() in AX 2012 (for details see: this post). In AX 7 alias D365 for Operations this is also possible, but the code looks different:

FormRun formRun = sender;
FormRunViewEditModeHelper viewEditModeHelper = formRun.viewEditModeHelper();