mahailiang
2008年结缘于AX......
展开
-
Cloud-hosted dev environment Retail升级失败
3,找到该脚本 :\DeployablePackages\\RetailServer\Scripts\DropAllRetialChannelDbObjects.sql.4,进入DEV环境的sql 数据库,然后针对axdb运行该脚本,该脚本会删除与Retail Channel Databse 有关的所以实体。5,回到LCS,resume执行部署,或者重新进行部署。1.登录进入DEV的桌面环境。打开该脚本文件,复制内容,原创 2023-02-25 21:20:23 · 148 阅读 · 0 评论 -
ADO中Release使用Self-Hosted Agent
最初设置Release的时候使用Microsoft-hosted Agent, 有时候会出现Release中状态提示失败但是包正常部署成功的现象。决定换成配置更灵活性能更好的Build machine作为Self-Hosted Agent.最主要是确认Agent Pool中Default Agent的Capabilities是否安装了AzurePS。重启Build machine就可以使用self-hosted agent了。原创 2022-10-19 15:11:00 · 140 阅读 · 0 评论 -
RecId
我记得好像AX最初版本RecId是所有表都唯一的。但是这样有一个坏处就是限制了数据库可存储的数据的条数。D365FO中RecId 不再全局唯一,但是表唯一。也可以通过右键表的RecId, 选择Modify, 可以查看是哪个Sequences负责生成RecId。每个表都有一个Sequences生成表的RecId,格式是:SEQ_TableId。...原创 2022-08-11 23:01:22 · 722 阅读 · 0 评论 -
Develop Windows PowerShell scripts
Develop Windows PowerShell scripts原创 2022-06-11 18:52:07 · 133 阅读 · 0 评论 -
Async framework
Async framework原创 2022-06-11 18:49:11 · 150 阅读 · 0 评论 -
Form methods
Form methods原创 2022-06-11 17:07:28 · 228 阅读 · 0 评论 -
Message API
通过使用Message() API,您可以对消息的生命周期有更多的控制,可以显式地添加和删除消息。如果您需要删除验证消息,而不是在越过保存边界时,或者用于显示与数据验证直接相关的用户体验的特定方面的信息消息,则可以使用此功能...原创 2022-06-11 16:26:36 · 346 阅读 · 0 评论 -
reindex 批处理在还原生产环境的数据后无法运行
D365FO reindex可以通过批处理Database index rebuild system job that needs to regularly run at off hours来做,还原了别的环境的数据后,此批处理对应的批处理组的Batch server可能会被清理掉,导致批处理无法运行。处理方法:找到当前Rebuild index的批处理组:在Batch group里指定一个Server作为Batch server...原创 2021-07-24 10:49:22 · 155 阅读 · 0 评论 -
Debug a copy of the production database
url:Debug a copy of the production database - Finance & Operations | Dynamics 365 | Microsoft DocsDatabase movement operations are a suite of self-service actions that can be used as part of data application lifecycle management (DataALM). This tutor原创 2021-07-07 21:52:33 · 143 阅读 · 0 评论 -
Flighting功能
Flighting可以开启某些特定的功能块。D365FO开启和关闭功能块有3中方式:1. Configration key2. Function mena原创 2021-06-18 02:10:07 · 396 阅读 · 0 评论 -
启用Saved view功能后个性化Grid添加字段,view details Bug的解决办法
测试版本PU39和PU41在PU39和PU41中,窗体的数据源如果用的是Outer join, 启用Saved view后通过个性化Grid添加字段,点击Item跳转始终会到同一个Item上。在Form的doresearch方法中添加如下代码可解决。以下是Form的Class extension类:public void doResearch(){ int position = InventTable_ds.getPosition(); next doResearch()原创 2021-04-13 11:24:41 · 106 阅读 · 0 评论 -
D365FO开发环境打开Desgin提示Missing Report Designer
D365FO PU40 VS从2015升级到了VS2017。当用VS2017设计报表时提示以下错误:解决方法:1. 点击Tools | Extensions and Updates2. 在Online页签上输入RDLC,点击下载。3. 下载完毕后关闭VS,会弹出一个安装对话框提示安装RDLC Extension,点击Modify 安装Extension。...原创 2021-03-19 15:48:08 · 332 阅读 · 0 评论 -
FiscalCalendars 获得财月第一天Bug
系统版本:PU39FiscalCalendars::findFirstDayOfMonth()可以获得财月一天的日期。但是该如过财月被拆分了,获得的日期就有问题,用以下代码可以解决:FiscalCalendarPeriod fiscalPeriod; date startDate; FiscalCalendarYear fiscalCalendarYear; Ledger ledger = ledger::findByLegalEntity(...原创 2021-03-15 17:55:04 · 197 阅读 · 0 评论 -
DP类关于Guid类型的Bug
案例前提:系统中拿数据到实体表,实体表新建了一个Guid类型的字段区分Session,实体表做数据处理后再将数据写入报表的TmpDB里,实体表数据用Guid字段区分。发现DP类再用Insert_Recordset或者Update_Recordset拿数据到TmpDB时,如果涉及到聚合函数就会出现拿不到聚合函数对应的数据的Bug。后改为采用表的CreatedTransactionId来解决:用:CreatedTransactionId createdTransId = appl.cur原创 2020-09-13 12:37:54 · 192 阅读 · 0 评论 -
现有量窗体添加新字段
需求:现有量窗体上新增物料组和物料名称,并且可以按照物料组筛选。现有量窗体的数量是按照物料和维度合计出来的,所以向这个窗体添加字段需要对字段做Group by才能正常显示。纪录下相关代码,以便以后使用。1.新建View:2.将View添加到现有量窗体的Datasource里。3.扩展类InventDimCtrl_Frm_OnHand,COC方法:modifyQueryBasedOnDatasourceName(注意:InventItemGroupItem和InventTabl...原创 2020-06-14 23:12:19 · 555 阅读 · 0 评论 -
D365FO 浏览器中运行可运行类
可运行类有两种方式可以在D365中运行:1.加一个ActionMenuItem挂在某个路径下。2.不加MenuItem直接在浏览器指令运行:https://<D365URL> /?cmp=<YourCompanyName>&mi=SysClassRunner&cls=<YourRunnableClassName>...原创 2020-05-12 11:58:57 · 457 阅读 · 0 评论 -
动态QueryRange
[ExtensionOf(classStr(SysQueryRangeUtil))]final class SBXSysQueryRangeUtilClass_Extension{ [QueryRangeFunctionAttribute] public static str customerDefault() { return CustParameters::find().SBXAccountNum; }}测试:cla...原创 2020-05-09 23:51:07 · 416 阅读 · 1 评论 -
D365FO物料预留
This topic describes the different options that are available for reserving inventory.You can automatically reserve inventory quantities for a specific sales order. This means that reserved inven...原创 2020-01-21 19:35:33 · 617 阅读 · 0 评论 -
动态显示Enum中的值
示例:在窗体的run()里调用如下方法:public void sbxSetFormControls() { //set which enum can be used for product type FormComboBoxControl pmfProductTypeControl = this.design().controlName(form...原创 2020-01-14 15:12:54 · 340 阅读 · 0 评论 -
扩展D365FO标签
如扩展:步骤如下:修改了标签文件需要同步数据库,标签文件才能生效。测试结果:原创 2019-12-16 10:14:25 · 368 阅读 · 0 评论 -
D365FO如何更改新建工程时默认的Model
在开发机下面的目录里存放有配置文件:C:\Users\Administrator\Documents\Visual Studio 2015\Settings配置文件:DynamicsDevConfig.xml原创 2019-12-16 09:24:26 · 240 阅读 · 1 评论 -
D365变更公司代码(DataAreaId)
目标需要改下面的数据:从TPSL改为TPXY需要改的表数据CompanyInfo(到数据库后台会发现,数据库中没有CompanyInfo表,因为CompanyInfo继承自DirPartyTable,所以数据只需要到DirPartyTable中变更即可,找到DirPartyTable的行中Name列值为Company accounts data的行把DataArea列改为目的值TP...原创 2019-05-16 14:56:34 · 680 阅读 · 0 评论 -
D365 中的DimensionDefaultingService类
AX2012中DimensionDefaultingService类在365中改为:LedgerDimensionFacade相关方法可以对应找到原创 2019-07-02 00:11:26 · 266 阅读 · 0 评论 -
DefaultDimension
private void createLineByQty(DimensionValue _dimensionValue) { ProdTableJour m_ProdTableJour; ProdTable m_prodTable; DimensionAttribute ...原创 2019-07-31 18:06:16 · 220 阅读 · 0 评论 -
VS调试D365标准类
去掉这里的对勾原创 2019-08-18 17:56:09 · 410 阅读 · 0 评论 -
生成LedgerDimension
public static RecId getDimension(str _ledgerAccount, str _businessUnit, str _costCentre, str _department, str _cashflow_cn) { DimensionServiceProvider DimensionServiceProvider = new ...原创 2019-08-18 11:14:02 · 245 阅读 · 0 评论 -
D365FO 更改标准窗体上的lookup
先参照下图找到对应窗体上的控件新建Extension class[ExtensionOf(formStr(PurchTable))]final class RIC_TP_PurchTableForm_Extension{ /// <summary> /// /// </summary> /// <param name...原创 2019-09-10 11:33:11 · 728 阅读 · 5 评论 -
Open API for JSON-based custom services in AX 7
If you’re familiar with SOAP web services, you likely know that they use Web Services Description Language (WSDL) to document what operations a service provide, what parameters they accept, what they ...原创 2018-05-14 21:13:04 · 269 阅读 · 0 评论 -
C#与D365FO交互
参考:https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/dev-tools/write-business-logic原创 2019-05-15 17:06:42 · 616 阅读 · 0 评论 -
LedgerDimension相关函数
As we know that Microsoft Dynamics AX 2012 has all new financial dimension framework and which is a really good enhancement in AX but for developers it is bit complex at the same time if you try handl...原创 2019-04-16 13:01:53 · 1023 阅读 · 0 评论 -
GeneralJournalEntry和VendPackingSlipJour, VendInvoiceJour的关联
protected void createDliveryNoInvoiceData() { GeneralJournalEntry mGeneralJournalEntry; GeneralJournalAccountEntry mGeneralJournalAccountEntry; SubledgerVoucherGeneralJour...原创 2019-01-02 16:38:59 · 385 阅读 · 0 评论 -
Accessing private\protected class methods and members from extension code
All class member variables are protected by default in AX 7, so it is impossible to access them from extensions. It becomes a real problem when you try to extend classes like SalesLineType.For examp...原创 2018-08-07 00:10:02 · 227 阅读 · 0 评论 -
D365系统提示无法打开菜单
可以尝试以下步骤:1. 同步数据库(能处理多数无法打开的问题)2. 编译ApplicationSuite Model并且勾上同步数据库3.全编译所有的Model勾上同步数据库4.重启IIS(运行-iisreset)...原创 2018-07-06 16:21:42 · 702 阅读 · 0 评论 -
Table Extension 中实现display方法
This posts helps you to understand and create a "display" method for the table extension.Lets say, the requirement is to add a method in the standard table, it can be achieved either by creating a ta...原创 2018-06-25 20:27:31 · 291 阅读 · 0 评论 -
ModifyField
[DataEventHandler(tableStr(PurchAgreementHeader), DataEventType::ModifiedField)] public static void PurchAgreementHeader_onModifiedField(Common sender, DataEventArgs e) { ModifyField...原创 2018-06-24 15:13:45 · 318 阅读 · 0 评论 -
Caller form datasource access in child form - Dynamics 365 for operations
Requirement: When you click on view details on vendor bank account, Vendor bank accounts form should filter based on vendor selected in purchase agreement.Solution: In Microsoft dynamics 365 for oper...原创 2018-05-08 11:19:13 · 218 阅读 · 0 评论 -
Dynamics 365/AX7: “DISPLAY“ method on table extension
This posts helps you to understand and create a "display" method for the table extension.Lets say, the requirement is to add a method in the standard table, it can be achieved either by creating a ta...原创 2018-05-08 11:00:53 · 417 阅读 · 0 评论 -
JSON-based custom service with parameters (AX 7)
Dynamics 365 for Operations deploys custom web services in two ways: as SOAP-based services and JSON-based services. AX developers are often familiar with SOAP services (which were used in AX 2012), b...原创 2018-05-14 20:57:08 · 175 阅读 · 0 评论 -
D365 Maintenance mode
参考:https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/sysadmin/maintenance-modeMicrosoft Dynamics 365 for Finance and Operations includes a new system-wide setting that is named...原创 2018-05-19 23:02:36 · 12 阅读 · 0 评论 -
控件Event Handler点击Button动态调用Form示例
67891011121314151617181920212223[FormControlEventHandler(formControlStr(HcmWorker, ArgsExampleButton), FormControlEventType::Clicked)] public static void ArgsExampleButton_OnClic...原创 2018-05-13 15:57:16 · 308 阅读 · 0 评论