Skip to main content

Posts

Showing posts from March, 2015

Computed columns in Views - Dynamics AX 2012

Computed columns have been using in SQL server since many versions but this feature was available Dynamics AX since version 2012. Follow steps described here to learn  how to create view  and walthrough the  complete example  to understand how can we add computed columns in AX 2012 Views. More examples can be found from here; http://daxmusings.codecrib.com/2011/10/computed-view-columns-in-ax-2012.html   Well, here is an example which illustrates how can we add computed columns in a view with different logic. Computed column; Returning Field in View public static server str compAmount() { #define.CompView(SWProjForecastCost) #define.CompDS(ProjForecastCost) #define.CostPrice(CostPrice)    return SysComputedColumn::returnField( tableStr (#CompView), identifierStr (#CompDS), fieldStr (#CompDS, #CostPrice)); } Computed column; Converting UTC Date to Date in View public static server str compDat...

Retrieving/Picking files from Directory through X++

Following piece of code to pick all files from a directory. static void readFromDirectory(Args _args) {     #Evat_NL     #File         // variable declration to retrieve files from folder     Filename            baseFolder;     Filename            pdfFilename;     Filename            foundBaseFileName;     Filename            foundFileName;         container            mainFolder, subFolder, fileContainer;     boolean              filesFoundMainFolder = true ;  ...

Tool to copy security permissions in AX

Copying security roles, groups, user options and associating worker against user The role based security works very well in AX 2012 and security development tool has also made the life of AX system administrator very charming. It was a nightmare to define security for each user in earlier versions of MS Dynamics AX.  However, there is one area which security development tool does not cover and is often required in many occassions. That is  "To Copy user roles from one user to another" . Let's say we have created/imported a new user in AX and System Administrator requires to assign same role(s), existing users have, to this new added user. This requirement might come due to identical nature of work or responsibilities shared among different users.  This tool will help you to copy users roles, users options, user groups, user's main accounts and user association with worker by creating new worker if not exists. User association with worker is required to perform ...