I was getting following error during customization of Dynamics AX. After some debugging i found that it is due to model. Error can be resolved by updating model. In this blog i am working with smmActivities but it can applied for any table. Goto your table in AOT you will see model name in square brackets in light color grey. You have to add this model to resolve issue. In my case model name is "Case Management". In toolbar go to Dynamics 365 →Model Management → Update model parameters. Select your model in which you are doing your customization, in my case it is "testModel" and click on next, scroll down and select "Case Management" and select next and then click on finish. Build your solution error should be gone now.
Use following methods to get Month Start Date and Month End Date. Pass any date of month in parameter. Month Start Date : TransDate dateInMonth=today(); TransDate firstDateOfMonth; ; firstDateOfMonth = DateStartMth(dateInMonth); Month End Date : TransDate dateInMonth=today(); TransDate endDateOfMonth; ; endDateOfMonth= endmth(dateInMonth);
We have done some customization in AX which perform insertion and updating data on multiple tables. It oftens fails and we have no clue where it fails so we decided to implement logging just for knowing how much steps are performed up till and if it fails where did we fails. We decided we will create separate table for logging and records every step in table which is about to performed so in this way we detail about steps. Normally we perform all activity in one transaction so if something fail whole process should be reverted but we want that our log should persists in table. There is a class UserConnection which exactly do what we wanted it to do. You just have to create its instance and on table just mention that it AX should use this new connection for this particular table. I am giving you an example. static void SampleUserConnection_Job(Args _args) { VendTable vendtable; MyLogTable myLogTable; UserConnection userConnection = new User...
Comments
Post a Comment