随笔分类 -  Dynamics Ax

Dynamics Ax 开发
摘要:CommaTextIO m_CSVFile; container m_con; InventTable m_inventTable; int i; #File ; m_CSVFile = new CommaTextIO("C:\\Users\\JSZhang1002\\Desktop\\Data\\Items.csv", #io_read); if (!m_CSVFile || m_CSVFile.status() != IO_Status::Ok) throw error("访问磁盘失败。"); while (m_CSVFile.status() == 阅读全文
posted @ 2014-01-02 09:28 Huaen 阅读(189) 评论(0) 推荐(0)
摘要:void importFromExcel(){ str file; FileNameFilter filter=["07-10",'*.xlsx',"97-02",'*.xls']; COMVariant Variant; SysExcelApplication app; SysExcelWorkbooks Workbooks; SysExcelWorkbook Workbook; SysExcelWorksheets Worksheets; SysExcelWorksheet Worksheet; SysExcelCel 阅读全文
posted @ 2014-01-02 09:26 Huaen 阅读(271) 评论(0) 推荐(0)
摘要:1,使用TextBuffer从Ax 2009中导出数据到CSV文件中:static void ExportToCSVFile01(Args _args){ TextBuffer textBuffer= new TextBuffer(); InventTable inventTable; FileIoPermission perm; counter Lines; #define.ExampleFile(@"c:\\AX2009.csv") #define.ExampleOpenMode("W"); try { perm = new FileIoPer... 阅读全文
posted @ 2014-01-02 09:25 Huaen 阅读(442) 评论(0) 推荐(0)
摘要:In this post, we will cover easy-to-do modifications that can be done to Role Center pages and do not require special development skills. The goal is to explain how to add a value to a Role Center page by changing to best suit your business needs.There are a number of predefined Role Centers for dif 阅读全文
posted @ 2013-10-22 14:28 Huaen
摘要:EventInboxandEventInboxDataare two tables which will store the data related to alerts.So one can easily generate alert by creating a record in EventInbox for xx user.The problem with above approach is that alert will be triggered but if the user want to see for which record alert is triggered (by cl 阅读全文
posted @ 2013-10-22 14:27 Huaen 阅读(161) 评论(0) 推荐(0)
摘要:我们知道display方法是每次刷新的时候从数据库读取数据。假如grid里面display方法太多的话就会非常慢(当然假如你设定了表的cachelookup方法,则AOS会缓存大概几百条记录,此时就未必从数据库磁盘读取数据)。若遇到这种情况,用cacheAddMethod方法把计算结果缓存起来是个好办法。注意:1, cacheAddMethod方法在读取数据的时候缓存计算结果,所以该方法需要放在datasource的ini方法的super()后;2,该方法只对Display和edit方法起作用;3,若注册了某Display和edit方法,即使在form中没有用到也同样计算;4,write, c 阅读全文
posted @ 2013-01-14 15:16 Huaen 阅读(223) 评论(0) 推荐(0)
摘要:平台设置用的是三台Windows2008R2服务器(当然也可以安装在同一台服务器),分别是SQL2008R2服务器、AX2009服务器、Sharepoint2010服务器。一、SQL2008R2服务器(步骤4-6是为配置扩展组件安装的,如果安装Visual Studio2008 with SP1,则步骤5-6可以省略)1、安装WINDOWS2008R2;2、安装SQL2008R2,因为要用到数据库引擎、报表、分析服务,所以干脆就用默认设置安装所有组件;3、用的是默认域用户安装,登陆http://localhost/reports时居然显示没权限,切换到本地管理员再次登陆,赋予域用户“内容管理员 阅读全文
posted @ 2012-10-17 14:09 Huaen 阅读(412) 评论(0) 推荐(0)
摘要://通过UtilIdElements删除static void Job1(Args _args) { UtilIdElements utilElement; ; ttsbegin; select utilElement where utilElement.name == 'myElementName' && utilElement.utilLevel == utilEntryLevel::cus // 用户层 && utilElement.recordType == utilElementType::Table; //... 阅读全文
posted @ 2012-10-15 10:24 Huaen 阅读(178) 评论(0) 推荐(0)
摘要:在子窗体中定义updatecaller方法void updateCaller(){ Common common; Object dataSource; Object caller; ; //----------------------------------- // 数据源中代码 common = element.args().record(); if (common && common.isFormDataSource() && formDataSourceHasMethod(common.dataSource(),... 阅读全文
posted @ 2012-10-15 10:18 Huaen 阅读(357) 评论(0) 推荐(0)
摘要:Axapta ax; AxaptaRecord custtable; AxaptaObject query;AxaptaObject queryrun;AxaptaObject querybuilddatasource;AxaptaObject querybuildrange; //---------------------------------// 登录ax = new Axapta(); ax.Logon("", "", "", "");//--------------------------------- 阅读全文
posted @ 2012-10-15 09:53 Huaen 阅读(405) 评论(0) 推荐(0)
摘要:打开vs2008,新建Dynamics AX Reporting项目 打开Report1.moxl 右键Datasets新建数据集,并双击数据集选择Query 右键Designs新建PrecisionDesign,切换到设计 阅读全文
posted @ 2012-09-11 16:50 Huaen 阅读(312) 评论(0) 推荐(0)
摘要:在“高级查询”窗体中 默认列出了窗体上与主数据表关联的所有表,如果不想要某个表或者某个表的条件列出来,我是这样做的:在系统SysQueryForm类中找到方法buildDataSourceTreeChild中private void buildDataSourceTreeChild(FormTreeControl _formTreeControl, SysDataSourceId _parentId, QueryBuildDataSource _queryBuildDataSource){ ImageRes imageRes; ImageRes over... 阅读全文
posted @ 2012-09-11 12:00 Huaen 阅读(370) 评论(0) 推荐(0)
摘要:Visual Studio Dynamics AX 报表中的数据集筛选器在面对一些复杂的筛选条件时,就显得力不从心了。。。select * from InventTrans where DatePhysical < _paramDate && (DateFinancial == datenull() || DateFinancial > _paramDate) 我们可以这样做1.创建一个类,名称InventTransReport并定义方法:public InventTrans returnData(str parmDate) { InventTrans InvTr; 阅读全文
posted @ 2012-09-11 10:01 Huaen 阅读(433) 评论(0) 推荐(0)