Wednesday, December 22, 2010

Cleanup cache .auc file

If you wants to delete the local cache, do following steps:

1. Stop AOS.
2. Delete the .auc file from users\\Appdata\ folder
3. Restart AOS.

Run SalesConfirmation report through code

Here is an example to print the sales confirmation report through code:

static void printSalesConfirmationReport(Args _args)
    Args args;
    ReportRun reportRun;
    SalesFormLetter salesFormLetter;
    PrintJobSettings printJobSettings;
    CustConfirmJour custConfirmJour;
    RecordSortedList list = new RecordSortedList(55);
    SalesTable salesTableUpdate;

    SELECT firstonly custConfirmJour order by ConfirmID desc
    where custConfirmJour.SalesId ==   salesTable.SalesId ;
    args = new Args(ReportStr(SalesConfirm));
    printJobSettings = new PrintJobSettings();

    salesFormLetter = new SalesFormLetter_Confirm(true);
    reportRun = new ReportRun(args);

Wednesday, December 8, 2010

Dynamics AX Business Intelligence

There is a new blog from Microsoft, focusing specifically on Dynamics AX BI. The blog can be found here.:

Dynamics AX Business Intelligence

AX SSRS Reporting Concepts
ScreenCast - AX SSRS Reporting Concepts on YouTube

Dilemma of delete actions- Restricted/Casecade+Restricted

To explain the difference b/w Restricted and Cascade+Restricted delete action, consider the following example:
Let's say you have tables CarTable and RentalTable, there is a one-to-many relationship between CarTable and RentalTable. Then if a record in CarTable is deleted and the delete action is:

None: No action on related records in RentalTable.

Cascade: All records in RentalTable related to the record being deleted in CarTable will also be deleted.

Restricted: The user will get a warning saying that the record in the CarTable cannot be deleted because transactions exist in table RentalTable. The user will be unable to delete the record in CarTable if one or more related records exist in the RentalTable.

Cascade + Restricted: This option is used when deleting records through more than two levels. Let's say another table existed that had a cascade delete action against CarTable and the CarTable had a Cascade + Restricted delete action against RentalTable. If the record in the top level table was about to be deleted it would also delete the related records in CarTable. In turn, all the records in RentalTable related to the records being deleted from CarTable would also be deleted (Cascade behaviour). If only a record in CarTable was about to be deleted, the user would get the same message when using the Restricted method (Restricted behaviour).