Posts

AX 2012 DEVOPS Build, Release setup and configuration

Image
After the initial setup in  AX 2012 Build process using AZURE DEVOPS Next step is to setup the build template and run the build process to get model and modelstore file which can be deployed to any environments. Goto your AZURE - DEVOPS dashboard by login to  https://visualstudio.microsoft.com/vso/ If you dont have a account, you can register for one free. Azure DEVOPS dashboard Select project for build process setup Select builds Click new pipeline Select Team foundation version control or the one you setup in intial step to move code to azure repo Select build reporsitory It should be the one you selected in initial setup steps Here select TFVC reporsitory Server path is the branch for which you want the build run Local path under - sourcesdirectory click continue for next step Select a build template - empty pipeline and add the build steps as per the AX build process order Now at the final step of build pipeline creation If you haven&

X++ Find SSRS print management setting for selected customer and report

static void VNPrintMgmtDoc(Args _args) {     PrintMgmtDocInstance    printMgmtDocInstance;     CustTable                         custTable;     PrintJobSettings               printJobSettings;     PrintMgmtSettings           printMgmtSettings;     SRSPrintDestinationSettings srsPrintDestinationSettings;     custTable = CustTable::find("ABC");     printMgmtDocInstance = PrintMgmtDocInstance::findByPrintType(custTable.RecId,custTable.TableId,PrintMgmtNodeType::CustTable,PrintMgmtDocumentType::SalesOrderInvoice,PrintMgmtDocInstanceType::Original,false);     select printMgmtSettings where printMgmtSettings.ParentId == printMgmtDocInstance.RecId;     srsPrintDestinationSettings = new SRSPrintDestinationSettings(printMgmtSettings.PrintJobSettings);     info(strFmt("%1",srsPrintDestinationSettings.fileFormat()));     info(strFmt("%1",srsPrintDestinationSettings.emailTo()));     info(strFmt("%1",srsPrintDestinationSettings.emailAttachme

AX 2012 Export user security role information to CSV file

static void VN_GetUserSecurityinfo(Args _args) { str                         fileName; boolean                     HasRecord; SecurityUserRole            securityUserRole; SecurityRole                securityRole; SecurityTask                securityTask; UserInfo                    userInfo; SecurityRoleAllTasksView    securityRoleAllTasksView; OMUserRoleOrganization      roleOrganization; OMInternalOrganization      internalOrganization; TextIO                          io; Str                             text; FilePath                        sourceFilePath; FileIOPermission                perm; #File    ;     fileName = "C:\\TEMP\\securityrolesusers.csv";     perm = new FileIOPermission(filename, #IO_WRITE); perm.assert(); text = 'User,RoleName, Organization,UserName\n'; while select securityUserRole        join securityRole         where securityRole.RecId == securityUserRole.SecurityRole             join userInfo                 wher

DEVOPS - AX 2012 DB sync error during VSTS build run

Image
When running database synchronisation as part of the build process in DEVOPS or through AX directly. If you have any indexes created directly in AX SQL database for performance purposes or other reason, DB sync drops them without issue. In some cases, DB sync fails to drop these indexes with below error. Rename the indexes with out any special characters in the first and last character of the name Re run the db sync Sync finishes and drops indexes. Finding the failed sql statement: On the log of the build step, if you scroll down, you can find the sql statement.  Copy the statement to SSMS and execute to find the error.

AX 2012 Build process using AZURE DEVOPS

Image
Deployment pipeline in AX is always been a challenge. But this has improved a lot over the years with AZURE DEVOPS. This post details how to setup your deployment pipeline using Azure DevOps (Previously VSTS). Using below process, we can build a modelstore for AX 2012 without a local Team foundation server and license cost. Firstly we need a server with windows installed and a working AX environment. Go to  https://visualstudio.microsoft.com/ Click on Azure Devops, enter the required details, select Team foundation version control and create a project. Goto Repos and create a new folder to store the code belongs to your custom model To add code to azure repo, go to AX and enable the version control parameters and check in the model to move all the custom code to Azure. Now under version control tab select Add model to version control, select the correct model and repository folder and click Ok  to move all the custom model objects to Azure r

AX 2012 X++ Export cross company vendor emails

static void AllSupplierEmailExport(Args _args) {     Dialog          dialog                  = new Dialog();     DialogField     dialogField;     AsciiIo         exportFile;     str             filePath, fileNameOnly;     filetype        type;     str             delimiter = ";";     int             totalRecords;     VendTable       vendTableAll;     VendTable       vendTable;     container       line;     dialogField =   dialog.addField(extendedTypeStr(FilenameSave), "Select File", "Select file to export");     dialog.caption("Extracting Vendor Remit To details");     dialog.filenameLookupFilter(['csv','*.csv']);     setPrefix(dialog.caption());     if(!dialog.run())     {         warning("Dialog closed.");         return;     }     startLengthyOperation();     [filePath, fileNameOnly, type] = fileNameSplit(dialogField.value());     exportFile = new AsciiIo(dialo

X++ Job to delete or update contact information through csv upload

This summary is not available. Please click here to view the post.