Code to print attachment Notes in AX 2012

Hi, static void Job75(Args _args){    DocuRefSearch        docuRefSearch;    SalesQuotationTable     quotationTable;    quotationTable = SalesQuotationTable::find(‘CBI-000039’);    docuRefSearch = DocuRefSearch::newTypeIdAndRestriction(quotationTable, ‘note’, DocuRestriction::External);               //    projActivityCostSummaryTmp.Notes                = Docu::concatDocuRefNotes(docuRefSearch);    print Docu::concatDocuRefNotes(docuRefSearch);    print DocuRef::find(quotationTable.dataAreaId,quotationTable.RecId).Notes;    pause;} Regards

Unretrieved Values in Grid AX 2012

Hi, You may face this kind of error / bugs during newly added fields to the table. Case 1:If the record is Unretrieved in table level-  Sync issueSolution:Right click and select synchronize that concern table. Case 2:If it not let you to open that tableSolution:Synchronize entire AOT. Case 3.If it says Unretrieved Values in GridSolution:Restart the AOS. […]

Conditional based decimal in SSRS

Hi, =iif(Fields!CurrencyCode.Value =”USD”,(FormatNumber(Fields!TotalAmountSumDebit.Value,2)),(FormatNumber(Fields!TotalAmountSumDebit.Value,4))) Regards,

Find number of hits and data usage in SQL * Applicable for all the applications (SQL as DB)

Hi, Right click on the DB and select script and page below one. SELECTtables.NAME AS TableName,indexes.name as IndexName,sum(partitions.rows) as NumberOfRows,sum(allocation_units.total_pages) as TotalPages,sum(allocation_units.used_pages) as UsedPages,sum(allocation_units.data_pages) as DataPages,(sum(allocation_units.total_pages) * 8) / 1024 as TotalSizeMB,(sum(allocation_units.used_pages) * 8) / 1024 as UsedSizeMB,(sum(allocation_units.data_pages) * 8) / 1024 as DataSizeMBFROMsys.tablesINNER JOIN     sys.indexes ON tables.OBJECT_ID = indexes.object_idINNER JOINsys.partitions ON indexes.object_id = […]

Checkbox in dialog in X++

static void DialogCheckBox(Args _args){    Dialog      dialog                   = new Dialog(“New dialog with checkBox”);    NoYesId     checkValue               = NoYes::No;    str                         strMessage = “Confirmation will create Variation. n […]

Due date based alert Configuration in AX 2012

Hi, 1. Create a a date field.2. Right click in form level and select create alerts.3. Select due in in the pop up.4. Select the email alert notification and no end time.  // Now records get created in Event Table.5. Select Organisation Administration Setup Alert  view details create the email template.6. Define the batch group […]

Alert customization – Getting a table details in email AX 2012

Hi, Please check for customization in EventActionEmailcreateEmailParameterMap class %data% will print the available notification message.%Message% will print the information event Table. You may add your values in createEmailParameterMap  map method of EventActionEmail class. Regards,

Print table name by table id in AX 2012

Hi, static void TableAOTName(Args _args){    print tableId2Name(615);    pause;} static void TableName(Args _args){    print tableId2PName(615);    pause;}

Print management in AX 2012

Hi, There are 2 set of tables associated to Print management1. Default2 Print management design. 1. Default will be called by classPrintMgmtDocTypemethodsgetDefaultReportFormat where as we can change this values in form setup form level. 2. For Print management on customized design called byTables – PrintMgmtReportFormatMethodspopulate addOther(PrintMgmtDocumentType::SalesOrderPackingSlip, ssrsReportStr(SalesPackingSlip, ReportUD), ssrsReportStr(SalesPackingSlip, ReportInternational), #NoCountryRegionId); Here ReportInternational is my […]

Code to get WBS and Summary cost and sales estimates of an smmActivity

public static void SummarySalesPriceEstimates(){     ProjWBSUpdateController                 controllerLoc;    HierarchyIdBase                         hierarchyIdLoc;    HierarchyTreeTable                      hierarchyTreeTableLoc;    str                   […]