Skip to main content

Infolog in MSD axapta

Infolog

The Infolog is used to communicate with the application users. You use the Infolog to inform the user of validations, if an error occurs, or to display information to the user while processing a job. The Infolog is opened in a separate window, and opens automatically when called by a program. Information in the Infolog is removed when the Infolog window is closed, so if you need the information for later use, you can print
the contents of the Infolog window by using the print menu item in the top menu.

Information in the Infolog can be triggered both from code and by the kernel. Kernel information typically involves system integrity issues, such as information about mandatory database fields. From X++ you can control the information in the Infolog.

There are three types of information in the Infolog. The types, which may be identified by the associated icon include: info , warning and error . Info text is generally displayed to inform the user about actions being performed by the system. Warnings and errors typically represent issues that may require action from the user, and may indicate that a process is unable to proceed. If a help page or an action is attached to the
information put in the Infolog, the icons will have a mark indicating the extra information.


 static void Intro_Infolog(Args _args)  
 {  
 int i;  
 ;  
 info("This is an info.");  
 warning("This is a warning.");  
 error("This is an error.");  
 setprefix("prefix text");  
 for (i=1; i<=3; i++)  
 {  
 setprefix("1. for loop");  
 info("loop 1");  
 }  
 for (i=1; i<=3; i++)  
 {  
 setprefix("2. for loop");  
 info("loop 2");  
 }  
 info("Check customer parameters.", "",  
 SysInfoAction_Formrun::newFormname(formStr(CustParameters),  
 identifierStr(Customer_defaultCust), ""));  
 info("Check the sales form help page.", "ApplDoc://Forms/SalesTable");  
 throw error("This error stop execution.", "");  
 }  
This is an example on how to use the Infolog from X++. The first three lines show how to add a simple info, warning and error information. When using warning() and error() information you will normally use the throw command as shown in the last line of the example, as the throw will stop any further action like updating a record.

If you are adding a lot of information to the Infolog, you can use the setprefix() function to organize the information and make the presentation more user friendly. The above example shows how you can structure a pair of nested loops so as to separately group the content in the Infolog. The prefix for the first Infolog entry represents the outer with separate indented prefixes created for each of the two loops that display info messages.

An entry in the Infolog takes three parameters. The last two parameters are options used for linking to a field in a form, or linking to a help page in the online help. The two last info() lines show how to use the optional parameters. The first links the Infolog entry to the customer parameter form. The system will display this form if the user double clicks on the message in the Infolog. The last info() entry links the Infolog entry to the sales
form’s help page. Notice the optional parameters are always used one at the time as you
cannot link to both a form and the help system. Using links in the Infolog is a userfriendly way of communicating with the user; when an error occurs. You can provide the user with information on where exactly to go to fix the problem or provide the user with additional help on how to resolve the error. Unfortunately, changes to these links do not propagate, so if a referenced form field name or help page is changed, you will have to manually maintain any associated links.

The Infolog has a size limit of 10,000 entries. The Infolog should not be used for reporting detailed status messages representing the normal activity of batch programs. You can programmatically change the infolog’s maximum size, but keep in mind that the Infolog is not meant to handle large amounts of data. Building an Infolog with several thousand entries takes time and processing resources

Popular posts from this blog

Code to get customer Primary Address in Ax 2012

Below Code to get customer Primary Address in Ax 2012. CustTable custTable_P; DirPartyTable dirPartyTable_P; DirPartyLocation dirPartyLocation_P; DirPartyLocationRole dirPartyLocationRole_P; LogisticsLocation logisticsLocation_P; LogisticsLocationRole logisticsLocationRole_P; LogisticsPostalAddress logisticsPostalAddress_P; LogisticsPostalAddress primaryAddress_P; while select custTable_P where custTable_P.AccountNum =='ED_01029' join dirPartyTable_P where dirPartyTable_P.RecId == custTable_P.Party join dirPartyLocation_P where dirPartyLocation_P.Party == custTable_P.Party && dirPartyLocation_P.IsPrimary==NoYes::Yes join dirPartyLocationRole_P where dirPartyLocationRole_P.PartyLocation == dirPartyLocation_P.RecId join logisticsLocationRole_P where logisticsLocationRole_P.RecId == dirPartyLocationRole...

Table lists which can have large number of records in Ax 2012

If you are facing database or application performance issue then you can check these tables that may have large number of records. ECORESPRODUCTVARIANTDIMENSIONVALUE INVENTBATCH ECORESPRODUCTMASTERDIMENSIONVALUE ECORESPRODUCTMASTERDIMENSIONVALUE ECORESPRODUCT ECORESPRODUCTTRANSLATION ECORESPRODUCT ECORESPRODUCTVARIANTDIMENSIONVALUE INVENTDIMCOMBINATION ECORESRELEASESESSIONPRODUCT ECORESRELEASEPRODUCTLEGALENTITY INVENTSUMLOGTTS INVENTCOSTLISTPARM GENERALJOURNALACCOUNTENTRY GENERALJOURNALACCOUNTENTRYZAKAT_SA SMMTRANSLOG LEDGERENTRYJOURNALIZING DIMENSIONFOCUSBALANCE MARKUPTRANS INVENTTRANSPOSTING INVENTREPORTDIMHISTORY SALESPARMLINE SOURCEDOCUMENTLINE INVENTTRANS TRANSACTIONLOG INVENTTRANSORIGIN INVENTSETTLEMENT SALESPARMSUBTABLE SALESPARMTABLE SOURCEDOCUMENTHEADER SALESPARMUPDATE SQLSYNCINFO GENERALJOURNALENTRY SUBLEDGERVOUCHERGENERALJOURNALENTRY CUSTSETTLEMENT SMMACTIVITYPARENTLINKTABLE INVENTSUMDATETRANS LEDGERTRANSSTATEMENTTMP DIMENSIONFOCUSLE...

Code to get Invoice settlement data for customer in ax 2012

This is simple Code to get Invoice settlement amount data for customer payment in ax 2012. This data is after posting of data. select sum(SettleAmountCur) from custSettlement where custSettlement.TransRecId == custtrans.RecId If you want get settlement amount before posting than you can refer spectrans table.The table SpecTrans contains all the transactions marked for settlement for payment journal. while select spectrans join custtransopen join custtrans where spectrans.SpecCompany == ledgerjournaltrans.DataAreaId && spectrans.SpecTableId == ledgerjournaltrans.TableId && spectrans.SpecRecId == ledgerjournaltrans.RecId && spectrans.RefCompany == custtranssopen.DataAreaId && spectrans.RefTableId == custtranssopen.TableId && spectrans.RefRecId == custtranssopen.RecId && custtransopen.RefRecId == custtrans.RecId && custtransopen.AccountNum == custtrans.AccountNum { info...