Tuesday, November 17, 2015

Change-based alert functionality is not working


Issue: 
Attempts to generate Change-based alerts within AX are not functioning.

Troubleshoot steps:

Verify following things:
1. The alert rules are created
2. The changed-based alert and email batch notifications are functioning
3. Email templates and email parameters are set up.
4. Batch Job is working.

If it is still not working, then check EventCUD table.

There might be records in EventCUD table which are in waiting status with Batch GUID other than {00000000-0000-0000-0000-000000000000}

Alert process works this way:

When the alert is triggered a record is inserted into EventCUD table with {00000000-0000-0000-0000-000000000000} Batch GUID. When the Batch Job for “Change base alerts” starts it will create multiple records in EventCUD with Batch GUID other than {00000000-0000-0000-0000-000000000000} as per EventCompanyRule Table and deletes original record. In later stage, job process the new records in EventCUD and generate alerts into EventInbox table. Once the alerts are generated in EventInbox table the records from EventCUD is deleted.
If the job ends unexpectedly, it leaves orphan records in EventCUD which are not processed and they stop Change based alert from working.

Resolution:
Either delete them or update their Batch GUID {00000000-0000-0000-0000-000000000000} as required.


SSRS AX 2012: TradeDocumentReportContract Error

 Error Message ; TradeDocumentReportContract object not initialized.


Stack trace

(C)\Classes\TradeDocumentReportController\preRunModifyContract - line 11
(C)\Classes\SrsPrintMgmtController\outputReports - line 65
(C)\Classes\TradeDocumentReportController\output - line 6
(C)\Classes\SalesConfirmController\output - line 6
(C)\Classes\TradeDocumentReportController\runPrintMgmt - line 17
(C)\Classes\SrsPrintMgmtController\run - line 14
(C)\Classes\SysOperationController\startOperation - line 10
(C)\Classes\SrsReportRunController\startOperation - line 12
(C)\Classes\SrsPrintMgmtController\startOperation - line 14
(C)\Classes\SrsPrintMgmtFormLetterController\startOperation - line 14
(C)\Classes\SalesConfirmController\main - line 24
(C)\Classes\FormFunctionButtonControl\Clicked

Resolution:
1. Stop AOS.
2. Delete all the files in C:\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\bin\XppIL/(Not the folders)
3. Start AOS. 
4. Try running report.( if it doesn’t work)
5. Perform a full Compile
6. Delete all the files in C:\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\bin\XppIL/Source
7. Perform a full CIL generation

Report will start working.