Monday, 12 May 2014

Create a New Table by using X++ code

static void newTableCreate(Args _args)
{
TreeNode      treeNode;
#AOT
;
treeNode = TreeNode::findNode(#TablesPath);
treeNode.AOTadd("Table_kanha");
SqlDataDictionary::synchronize();
}

********************************************************************

Create a new table or we can do same for all AOT. use this according as we want.

#define.TablesPath('\\Data Dictionary\\Tables')
#define.TableMapsPath('\\Data Dictionary\\Maps')
#define.ViewsPath('\\Data Dictionary\\Views')
#define.ExtendedDataTypesPath('\\Data Dictionary\\Extended Data Types')
#define.BaseEnumsPath('\\Data Dictionary\\Base Enums')
#define.LicenseCodesPath('\\Data Dictionary\\License Codes')
#define.ConfigurationKeysPath('\\Data Dictionary\\Configuration Keys')
#define.SecurityKeysPath('\\Data Dictionary\\Security Keys')
#define.TableCollectionsPath('\\Data Dictionary\\Table Collections')
#define.PerspectivesPath('\\Data Dictionary\\Perspectives')
#define.MacrosPath('\\Macros')
#define.MacroPath('\\Macros\\%1')
#define.ClassesPath('\\Classes')
#define.FormsPath('\\Forms')
#define.FormsDesignPath(#FormsPath + '\\%1\\Designs\\Design')
#define.PartsPath('\\Parts')
#define.ReportsPath('\\Reports')
#define.ReportTemplatesPath('\\Reports\\Report Templates')
#define.SectionTemplatesPath('\\Reports\\Section Templates')
#define.QueriesPath('\\Queries')
#define.QueryPath('\\Queries\\%1')
#define.DataSetsPath('\\Data Sets')
#define.JobsPath('\\Jobs')
#define.JobPath('\\Jobs\\%1')
#define.MenusPath('\\Menus')
#define.MenuItemsPath('\\Menu Items')
#define.MenuItemsDisplayPath('\\Menu Items\\Display')
#define.MenuItemsOutputPath('\\Menu Items\\Output')
#define.MenuItemsActionPath('\\Menu Items\\Action')
#define.ResourcesPath('\\Resources')
#define.SecurityPath('\\Security')
#define.ReferencesPath('\\References')
#define.LabelFilesPath('\\Label Files')
#define.LabelFilePath('\\Label Files\\%1')
#define.LabelFileLanguagesPath('\\Label Files\\%1\\Languages')
#define.LabelFileLanguagePath('\\Label Files\\%1\\Languages\\%2')
#define.WebPath('\\Web')
#define.WebFormsPath('\\Web\\Web Forms')
#define.WebMenusPath('\\Web\\Web Menus')
#define.WebFilesPath('\\Web\\Web Files')
#define.WebWebPartsPath('\\Web\\Web Files\\Web Parts')
#define.WebPageDefinitionsPath('\\Web\\Web Files\\Page Definitions')
#define.WebStaticFilesPath('\\Web\\Web Files\\Static Files')
#define.WebStaticFilesProxiesFormat('\\Web\\Web Files\\Static Files\\%1')
#define.WebStaticFilesEPProxyNodeListPath('\\Web\\Web Files\\Static Files\\EPProxyNodeList')
#define.WebControlsPath('\\Web\\Web Files\\Web Controls')
#define.WebListsPath('\\Web\\Web Files\\List Definitions')

#define.WebMenuItemsPath('\\Web\\Web Menu Items')
#define.WebMenuItemsUrlPath('\\Web\\Web Menu Items\\URLs')
#define.WebMenuItemsActionPath('\\Web\\Web Menu Items\\Actions')
#define.WebContentItemsPath('\\Web\\Web Content')

#define.WebContentItemsDisplayPath('\\Web\\Web Content\\Display')
#define.WebContentItemsOutputPath('\\Web\\Web Content\\Output')
#define.WebContentItemsManagedPath('\\Web\\Web Content\\Managed')

#define.WebletItemsPath('\\Web\\Weblets')

#define.WebModulesPath('\\Web\\Web Modules')

#define.WorkflowPath('\\Workflow')
#define.WorkflowProvidersPath('\\Workflow\\Providers')
#define.WorkflowCategoriesPath('\\Workflow\\Workflow Categories')
#define.WorkflowApprovalTasksPath('\\Workflow\\Approvals')
#define.WorkflowTasksPath('\\Workflow\\Tasks')
#define.WorkflowAutomatedTasksPath('\\Workflow\\Automated Tasks')
#define.WorkflowTypesPath('\\Workflow\\Workflow Types')
#define.WorkflowTypeElementsPath('\\Supported Elements')
#define.WorkflowTypeLineItemWorkflowsPath('\\Line Item Workflows')
#define.WorkflowTypeLineItemWorkflowTypesPath('\\Line Item Workflow Types')
#define.WorkflowOutcomesPath('\\Outcomes')
#define.WorkflowHierarchyProvidersPath('\\Workflow\\Providers\\Hierarchy Assignment')
#define.WorkflowParticipantProvidersPath('\\Workflow\\Providers\\Participant Assignment')
#define.WorkflowQueueProvidersPath('\\Workflow\\Providers\\Queue Assignment')
#define.WorkflowDueDateProvidersPath('\\Workflow\\Providers\\Due Date Calculation')
#define.WorkflowProviderWorkflowTypesPath('\\Workflow Types')

#define.ServicesPath('\\Services')
#define.ServicePath('\\Services\\%1')
#define.ServiceOperations('Operations')
#define.ServiceOperationPath('\\Services\\%1\\Operations\\%2')
#define.ServiceGroupsPath('\\Service Groups')
#define.ServiceGroupPath('\\Service Groups\\%1')
#define.ServiceNodeReferencePath('\\Service Groups\\%1\\%2')

#define.SecCodePermissionsPath('\\Security\\Code Permissions')
#define.SecDutiesPath('\\Security\\Duties')
#define.SecPrivilegesPath('\\Security\\Privileges')
#define.SecProcessCyclesPath('\\Security\\Process Cycles')
#define.SecRolesPath('\\Security\\Roles')

#define.SecPoliciesPath('\\Security\\Policies')
#define.SecPolicyPath('\\Security\\Policies\\%1')
#define.SecPolicyConstrainedTablesPath('\\Security\\Policies\\%1\\Constrained Tables')
#define.SecPolicyConstrainedTablePath('\\Security\\Policies\\%1\\Constrained Tables\\%2')
#define.SecPolicyConstrainedTableLevel2Path('\\Security\\Policies\\%1\\Constrained Tables\\%2\\%3')

#define.ReportLibrariesPath('\\Report Libraries')

#define.SSRSReportsRootPath('\\SSRS Reports')
#define.SSRSReportsPath('\\SSRS Reports\\Reports')
#define.ReportStyleTemplatesPath('\\SSRS Reports\\Report Style Templates')
#define.DatasourcesPath('\\SSRS Reports\\Report Datasources')
#define.ReportImagesPath('\\SSRS Reports\\Report Images')
#define.LayoutTemplatesPath('\\SSRS Reports\\Report Style Templates\\Layout Templates')
#define.ListStyleTemplatesPath('\\SSRS Reports\\Report Style Templates\\List Style Templates')
#define.MatrixStyleTemplatesPath('\\SSRS Reports\\Report Style Templates\\Matrix Style Templates')
#define.TableStyleTemplatesPath('\\SSRS Reports\\Report Style Templates\\Table Style Templates')
#define.PieChartStyleTemplatesPath('\\SSRS Reports\\Report Style Templates\\Pie and Doughnut Chart Style Templates')
#define.XYChartStyleTemplatePath('\\SSRS Reports\\Report Style Templates\\XY Chart Style Templates')

#define.VSProjectsPath('\\Visual Studio Projects')
#define.VSProjectsAXModelPath('\\Visual Studio Projects\\Dynamics AX Model Projects')
#define.VSProjectsCSharpPath('\\Visual Studio Projects\\C Sharp Projects')
#define.VSProjectsVBasicPath('\\Visual Studio Projects\\Visual Basic Projects')
#define.VSProjectsWebAppPath('\\Visual Studio Projects\\Web Application Projects')
#define.VSProjectsAnalysisPath('\\Visual Studio Projects\\Analysis Services Projects')
#define.VSProjectsOtherPath('\\Visual Studio Projects\\Other Projects')
#define.VSProjectContentFolder('project content')
#define.VSProjectOutputFolder('project output')
#define.VSProjectCache('VSProjectCache')
#define.SuspendVSProjectEvents('SuspendVSProjectEvents')
#define.VSProjectPathMatch('^\\\\Visual Studio Projects\\\\[^\\\\]+\\\\[^\\\\]+$')

#define.FieldPath( '\%1\\Fields\\\%2' )
#define.RelationsPath('\%1\\Relations\\\%2' )

#define.SystemDocPath('\\System Documentation')
#define.SystemGlobalPath('\\System Documentation\\Global')
#define.SystemPropertyPath('\\System Documentation\\Property')
#define.SystemReservedWordsPath('\\System Documentation\\Reserved Words')
#define.SystemFunctionsPath('\\System Documentation\\Functions')
#define.SystemTablesPath('\\System Documentation\\Tables')
#define.SystemTypesPath('\\System Documentation\\Types')
#define.SystemEnumsPath('\\System Documentation\\Enums')
#define.SystemClassesPath('\\System Documentation\\Classes')

#define.ApplicationDeveloperDocPath('\\Application Developer Documentation')
#define.ApplicationDeveloperDocTablesPath('\\Application Developer Documentation\\Tables')
#define.ApplicationDeveloperDocClassesPath('\\Application Developer Documentation\\Classes')

#define.ApplicationDocPath('\\Application Documentation')
#define.ApplicationHelpTopicsPath('\\Application Documentation\\Help Topics')
#define.ApplicationHintsPath('\\Application Documentation\\Hints')
#define.ApplicationGlobalPath('\\Application Documentation\\Global')
#define.ApplicationExtendedDataTypesPath('\\Application Documentation\\Extended Data Types')
#define.ApplicationBaseEnumsPath('\\Application Documentation\\Base Enums')
#define.ApplicationLicenseCodesPath('\\Application Documentation\\License Codes')
#define.ApplicationConfigurationKeysPath('\\Application Documentation\\Configuration Keys')
#define.ApplicationSecurityKeysPath('\\Application Documentation\\Security Keys')
#define.ApplicationTablesPath('\\Application Documentation\\Tables')
#define.ApplicationMenuItems('\\Application Documentation\\Menu Items')
#define.ApplicationMenuItemsDisplayPath('\\Application Documentation\\Menu Items\\Display')
#define.ApplicationMenuItemsOutputPath('\\Application Documentation\\Menu Items\\Output')
#define.ApplicationMenuItemsActionPath('\\Application Documentation\\Menu Items\\Action')
#define.ApplicationFormsPath('\\Application Documentation\\Forms')
#define.ApplicationWebFormsPath('\\Application Documentation\\Web Forms')
#define.ApplicationReportsPath('\\Application Documentation\\Reports')
#define.ApplicationQueriesPath('\\Application Documentation\\Queries')
#define.ApplicationClassesPath('\\Application Documentation\\Classes')
#define.ApplicationWebMenuItems('\\Application Documentation\\Web Menu Items')
#define.ApplicationWebMenuItemsUrlPath('\\Application Documentation\\Web Menu Items\\URL')
#define.ApplicationWebMenuItemsActionPath('\\Application Documentation\\Web Menu Items\\Action')
#define.ApplicationWebContentItems('\\Application Documentation\\Web Content Items')
#define.ApplicationWebContentItemsDisplayPath('\\Application Documentation\\Web Content Items\\Display')

#define.ApplicationWebContentItemsOutputPath('\\Application Documentation\\Web Content Items\\Output')

No comments:

Post a Comment

Labels

#veryusefulcode (1) AIF (8) AOT Maps (1) Args (1) Ax 2009 Reports (2) AX 2012 navigation (1) Ax 2012 Interview Questions (1) AX 7 (2) AX Architecture (1) Ax Backup (1) AX Workflow (2) AX2012 (1) AX2012 R2 (1) Ax2012R3 (1) AX2012R3 Dynamics Connector Step by Step Installation and Configuration (1) AX2012R3 EP Step by Step Installation and Configuration EP R3 (1) AX2012R3 HelpServer Step by Step Installation and Configuration (1) AX2012R3 Rapid Start Connector Step by Step Installation and Configuration (1) AX2012R3 Report Server and Analysis Server Step by Step Installation and Configuration (1) AX7 (1) Best practices (1) Blocking user to enter (1) Collection Classes (1) Container (1) D365FO (3) Data Migration Frame Work ax 2012R3 (1) Deleting duplicate Record from Table – Ax2012 (1) Delivery due date notification workflow in Ax 2012 (1) Development Steps EP (1) Dimensions (1) DIXF (1) DMF in Ax 2012 R3 (1) Dynamics Ax 2012 Interview Questions (1) DYNAMICS AX 2012 INTERVIEW QUESTIONS PART 2 (1) DYNAMICS AX 7 (1) EDT relation Migration Tool (1) EP AX 2012 (1) Ep Lookup (1) Error (1) Event Handler (1) F5 (1) File Handling (4) Filter on AX2012 Listpage (1) filtering (2) financial dimensions in AX 2012 (3) form (1) images (1) Installation and Configration (4) Installation and Configuration (11) Installation of Management Reporter 2012 for AX 2012 (1) Interaction class in ax 2012 (1) Interview Question (1) Interview Questions For Ax 2012 (1) Invent DIm (1) Jobs (2) license (1) List page and form menuitem enable code (1) Methods (1) microsoft Dynamics AX 365FO (1) Number Sequence Generation – AX 2012 (5) Number Sequence2012 (1) OLTP-OLAP (1) Passing Args (1) Passing form caller and menu item caller in ax 2012 (1) Passing Multiple Records Args (1) Posting in Ax 2012 (1) POSTING PURCHASE ORDER (1) Query (1) Query Filter Form (2) Query Ranges in X++ (1) Question and Answer (1) Report (1) Reports Controller class (1) RLS in ax 2009 (1) SALES ORDER IMPORT/EXPORT FRAMEWORK BY DMF (1) Security (1) security roles (1) Security Sysqueryrangeutil (1) Sharepoint 2016 (1) SQL SERVER (1) SSRS (2) SSRS Reports Controller class (2) Table collections & Virtual company (1) Time (1) TIPS AND TRICKS (1) Web service AIF (3) Web Services on IIS (AIF) Step by Step Installation and Configuration (1) workflow ax2012 (1) Workflow installation (1) Workflow Method (3) X++ (1)