Errata

Inside Microsoft Dynamics AX 2012

Errata for Inside Microsoft Dynamics AX 2012

The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted By Date submitted Date corrected
Ch. 3
Chapter 3 - Writer managed code - Read Excel customers

1. This is not actually an error but I think it would help any future readers when they try to run the sample managed code. C# code on chapter 3 under section 'Write managed code' requires the provider Microsoft.ACE.OLEDB.12.0 to read the Excel spreadsheet data. I downloaded and installed the 2007 Office System Driver: Data Connectivity Components from the URL http://www.microsoft.com/en-us/download/confirmation.aspx?id=23734 to get the sample working.

2. customers.Write(); only writes the last read row from the Excel spreadsheet. Changing the line to customers.Insert() fixed the issue and correctly inserted all the rows available on the spreadsheet into Dynamics AX table. I am not sure why customers.Write() wouldn't work.

Note from the Author or Editor:
On page 77 in the section "Write managed code," please add the following as a note immediately after the second paragraph:

Note The example in this section requires the Microsoft.ACE.OLEDB.12.0 provider to read data from Excel. You can download the provider from http://www.microsoft.com/en-us/download/confirmation.aspx?id=23734.

Siva  Nov 05, 2012  Dec 21, 2012
Ch 3.
Chapter 3 - Proxies - Call managed code to open CustTable form

I could not make the below code work. I created the C# project OpenFormInClient and compiled it successfully. I have deployed the C# project to AOT without any issues. However, the AX job does not find the class OpenFormInClient.OpenFormClass.

static void OpenFormFromDotNet(Args _args)
{
OpenFormInClient.OpenFormClass opener;
opener = new OpenFormInClient.OpenFormClass();
opener.DoOpenForm("CustTable");
}

I added an App.Config file to the C# project and pasted the below configuration section but without any success. I changed the target framework of the project to .NET 3.5. The C# project compiles successfully but it does not show up in the AX job. Restarting AOS didn't help either. I understand that the book suggests using .NET Business Connector is not the recommended approach but I would like to see how the sample code would work.

By the way, there is a double quotation before the tag <supportedRuntime, which should not be there.

<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
</configuration>

Note from the Author or Editor:
On page 84, in the code example after the first paragraph, please remove the extra double quote immediately before <supportedRuntime

In other words, please change "<supportedRuntime to <supportedRuntime

Siva  Nov 05, 2012  Dec 21, 2012
Printed
Page 7
First sentence in Visual Studio section

Text is missing in the sentence that starts with "Use this development Environment" , right after "Microsoft .Net plug-ins for".
I think "for" is in the wrong place.

Note from the Author or Editor:
On page 7, in the description for the Visual Studio bullet, please change the sentence that follows to:

Use this development environment to develop Microsoft .NET plug-ins and extensions for Microsoft Dynamics AX clients, servers, and services; to develop for Enterprise
Portal, and to develop SSRS reports.

Anonymous  Dec 27, 2012  Aug 09, 2013
Printed
Page 27
Last 2 sentences on the page

There is a missing period between two sentences.

"You can specify a startup project in the Options form [<-period needs to go here] If specified, the chosen project automatically opens when Microsoft Dynamics AX is started."

Note from the Author or Editor:
On page 27, in the last paragraph on the page, please add a missing period as follows:

You can specify a startup project in the Options form [<-period needs to go here] If specified, the chosen project automatically opens when Microsoft Dynamics AX is started.

Rick Pierson  Dec 13, 2012  Dec 21, 2012
Printed
Page 34
Bottom half

The text reads:

----------
Each text resource in the label file has a 32-bit integer label ID, label text, and an optional label description. The structure of the label file is simple:

@<Label file identifier><Label ID> <Label text>
[Label description]
----------

But then Figure 2-13 shows the contents of a label file, and there is no <Label file identifier> ... just <@<Label ID> <Label text> (and in one case the optional [Label description]).

Both the text and the figure indicate that "<Label file identifier>" should be removed from "@<Label file identifier><Label ID> <Label text>".

Note from the Author or Editor:
On Page 34, in the text above Figure 2-13, please change
@<Label file identifier><Label ID><Label text>

to
@<Label ID><Label text>

Rick Pierson  Dec 28, 2012  Aug 09, 2013
Printed
Page 39 & 40
Paragraphy above table 2-4 (page 39) and Note (page 40)

----------
In the Compiler output window, click Setup > Compiler to define the types of issues that the compiler should report. Compiler warnings are grouped into four level, as shown by the examples in Table 2-4. Each level represents a certain level of severity, with 1 being the most critical and 4 being recommended to comply with best practices. (p39)
----------
----------
Note You must set the compiler error level to 4 if you want best practice rule violations to be reported. To turn off the Best Practices tool, on the Tools menu, click Options > Development, and then click Compiler and set the diagnostic level to less than 4. (p40)
----------

If there are 2 different ways to set the compiler warning level, both paragraphs should use the same one to avoid confusion.

If there aren't 2 different ways set the compiler warning level, then it appears one or the other is in error.

(I cannot access AX 2012 yet, so cannot try it out myself).

Note from the Author or Editor:
In the note on page 40, please change the second sentence to the following:

"To turn off best practice violations, in the Compiler output window, click Setup > Compiler, and then set the compiler error level to less than 4."

Rick Pierson  Dec 28, 2012  Aug 09, 2013
PDF
Page 55
Top

Figure 2-25 "Search results in the Find tool" has sneaked its way into the Compare tool section. It should be in the section before Compare tool, which is Find tool.

Note from the Author or Editor:
Please move Figure 2-25 and its caption from page 55 to immediately before the last paragraph in the "Find tool" section on page 54. There is a reference to Figure 2-25 in the next to last paragraph in the section. The figure should gto after that.

Palle Agermark  Nov 21, 2012  Dec 21, 2012
PDF
Page 60
Just abot the Tip section

The book says: "Updating the Cross-Reference tool also compiles the entire AOS because the compiler emits cross-reference tool".

But in AX 2012 R2 you can update the cross reference in batch IL mode with the xRefUpdateIL class. This doesn't compile any code, since compilation requires a client to be running.

So is it not true that there actually is a way to update the cross-reference on already compiled code, without having to wait for the code base to be compiled as well?

Note from the Author or Editor:
In the Tip section on page 60, please change "cross-Reference" to "cross-reference." The other instances of "Cross-Reference" refer to a particular tool and should remain title capped.

Palle Agermark  Nov 21, 2012  Dec 21, 2012
PDF
Page 66
Last row of the table on the page

The description for "Get the latest element of an element" ends with "Get Latest is not availble with MorphX VCS".

It actually is!

Note from the Author or Editor:
Please remove the last sentence from the last cell in the table on Page 66.

The sentence reads, "Get Latest is not available with MorphX VCS."

Palle Agermark  Nov 21, 2012  Dec 21, 2012
PDF
Page 66
Below the table

Below table 2-9 "Version control tasks" theres is the following caption which makes no sense: "Figure 2-34 show the Check In dialog box"

Note from the Author or Editor:
Please move the line "Figure 2-34 shows the Check In dialog box." from immediately below the table on page 66, to immediately before Figure 2-34 on page 67.

Palle Agermark  Nov 21, 2012  Dec 21, 2012
PDF
Page 69
Figure 2-36

Figure 2-36 "The Syncronization Log dialog box" has sneaked its way into the "Show the history of an element" section. It should have been in the previous section; "View the synchronozation log".

Note from the Author or Editor:
Please move Figure 2-36 and its caption from page 69 to immediately after the second-to-last paragraph on page 68. That paragraph contains a reference to Figure 2-36.

Palle Agermark  Nov 21, 2012  Dec 21, 2012
Printed
Page 99
3rd sentence in paragraph just above Table 4-4

The word 'immediately' is misspelled as "mmediately".

"You must define all fields, however, on the selection table model element, and only one selection table is allowed mmediately after the from keyword."

Note from the Author or Editor:
On page 99, please change "mmediately" to "immediately."

Offending sentence is as follows:

"You must define all fields, however, on the selection table model element, and only one selection table is allowed mmediately after the from keyword."

Rick Pierson  Dec 31, 2012  Aug 09, 2013
PDF
Page 120
1st paragrapgh under Delegates, 3rd line

The statement "Delegates are always public" is fundamentally wrong, it should be "Delegates are always protected"

Khaled El-Sayed  Feb 14, 2013  Aug 09, 2013
Printed
Page 140
First bullet point

The word "the" is missing:

"The navigation layer consists of top-level pages that serve as a starting point for [THE] user as he or she ..."

RIck Pierson  Dec 31, 2012  Aug 09, 2013
Printed
Page 146
Last paragraph

The text states "The steps in this scenario correspond to the numbered items in Figure 5-9 ..." - it should refer to Figure 5-8 instead.

Note from the Author or Editor:
In the last paragraph on page 146, please change "Figure 5-9" to "Figure 5-8."

Rick Pierson  Nov 21, 2012  Dec 21, 2012
Printed
Page 147
Step 4

The text states, "4. ... The CSR clicks the Sales tab of the Action pane and clicks the new Sale Quotation button.", but the referred to figure (Figure 5-8) does not have a Sales tab on the Action pane, and the circled 4 in the figure is on the Customer tab of the Action pane.

Note from the Author or Editor:
In Step 4 on page 147, please change "Sales tab" to "Sell tab."

In Figure 5-8, please move the "4" so that it is above the Sell tab. It is currently above the Customers button.

Rick Pierson  Nov 21, 2012  Dec 21, 2012
Printed
Page 148
Figure 5-10

On page 147 the text states, "the CSR could quickly check the Related Information FactBox (Figure 5-10) to see all current open sales orders. By clicking this link, she is taken to the Sales Order List page." But Figure 5-10 does not show a Related Information FactBox, nor does it show the Open Sales Orders link (which, however, is displayed in Figure 5-7), nor does it show the Sales Order List page.

Note from the Author or Editor:
Please change the final paragraph on page 147 to the following:

"If the customer called to check the status of his most recent payment, the CSR could quickly check the
Recent Activity FactBox (Figure 5-10) to see the amount of the payment and the date it was received."

Rick Pierson  Nov 21, 2012  Dec 21, 2012
Printed
Page 150
next to last bullet point

Looks like two different ways of phrasing it were considered and accidentally mixed:

"This will require that you to optimize the queries used to load the list page."

Should be either:

1) "This will require that you optimize the queries used to load the list page."

2) "This will require you to optimize the queries used to load the list page."

Note from the Author or Editor:
"This will require that you optimize the queries used to load the list page." is correct.

Rick Pierson  Dec 31, 2012  Aug 09, 2013
Printed
Page 167
Unit of Work paragraph at bottom

The third sentence in the Unit of Work paragraph begins, "This is can be troublesome ..."

Note from the Author or Editor:
In the Unit of Work section on page 167, please change the third sentence from "This is can be troublesome" to "This can be troublesome."

Rick Pierson  Nov 21, 2012  Dec 21, 2012
Printed
Page 174
Last sentence of the Runtime Modifications section

The last sentence duplicates the word "the", resulting in "the the":

"Locking the form can also improve performance because the the form is redrawn only once."

Note from the Author or Editor:
On page 174, in the last sentence of the "Runtime modifications" section, please remove the repeated word "the."

Offending sentence:
Locking the form can also improve performance because the the form is redrawn only once.

Rick Pierson  Dec 13, 2012  Dec 21, 2012
Printed
Page 179
First sentence in 'ManagedHost Control' section

The word order "a using" should be reversed, to "using a".

-----
... or when a using prebuilt component would save time ...
-----

Rick Pierson  Jan 03, 2013  Aug 09, 2013
Printed
Page 181
Last sentence of first bulleted list item under Types of Parts

It appears that either the book or MSDN is in error concerining which parts can be used for preview panes.

1) The book says, "Preview panes for list pages are always modeled as info parts."

2) MSDN says that a preview pane can be modeled as a form part ...
"Form Part A part that represents a pointer to a form. You use a form part when you want a form to appear in the FactBox pane, enhanced preview, or preview pane."
(http://msdn.microsoft.com/en-us/library/gg844683.aspx retrieved 04/30/2013)

PS: MSDN cannot be talking about a different kind of preview pane since ...
?A list page is the only type of form that has a preview pane.?
(http://msdn.microsoft.com/en-us/library/gg847986.aspx retrieved 04/30/2013)

PPS: I do not have access to AX 2012 so cannot figure out which is correct.

Note from the Author or Editor:
Please change the offending sentence to the following:

"Preview panes for list pages should be modeled as info parts, so that they are also visible in Enterprise Portal."

Rick Pierson  Apr 30, 2013  Aug 09, 2013
Printed
Page 185
run method , 1st statement

"Called when the form is initialized." should be "Called after the form is initialized."

Khaled El-Sayed  Feb 15, 2013  Aug 09, 2013
Printed
Page 218
Step 10

An invalid acronym ("AOD") is used (it should be "AOT" instead).

"Set the ... to the display menu item that corresponds to the details page, and then refresh the AOD."

Note from the Author or Editor:
On page 218, in step 10 of the procedure, please change "AOD" to "AOT."

Rick Pierson  Dec 17, 2012  Aug 09, 2013
Printed
Page 223
Web.config code after second paragraph

That numeric value (45) for timeout in the paragraph does not match the numeric value (15) in the XML ...

"... to set the maximum number of cached concurrent sessions to 300 and the session timeout to 45 seconds ...

<Microsoft.Dynamics>
<Session MaxSessions="300" Timeout="15" />
</Microsoft.Dynamics>"

Note from the Author or Editor:
In the first code example on page 223, please change

Timeout="15" />

To

Timeout="45" />

Rick Pierson  Dec 17, 2012  Aug 09, 2013
Printed
Page 355
3rd paragraph from bottom of page: last sentence of that paragraph

A comma is misplaced.

"Instead of each security role being defined individually, in a security role, hierarchy security roles can inherit the permissions from other security roles and reuse them."

The second comma should be moved to the right by one word, so that it comes after the word hierarchy ...

"Instead of each security role being defined individually, in a security role hierarchy, security roles can inherit the permissions from other security roles and reuse them."

Rick Pierson  Jan 08, 2013  Aug 09, 2013
Printed
Page 360
Last paragraph

The first sentence of the last paragraph says, "In some situations, a menu item points to a class or a report directly." It should not say "report", but "service operation" (due to the context of the paragraph: Code Permissions).

Note from the Author or Editor:
On page 360, in the first sentence of the last paragraph, please change "report" to "service operation."

Rick Pierson  Dec 03, 2012  Dec 21, 2012
Printed
Page 390
"Namespace" bullet point neart top of page

The last sentence of the Namespace bullet point refers to an example, but there are no examples being used.

"Namespace Optionally, you can specify the XML namespace that should be used in the WSDL. If the XML namespace isn't specified, http://tempuri.org is used by default. This example uses the namespace http://schemas.contoso.com/axbook/2012/services."

The last sentence, referring to an example, should be deleted.

Rick Pierson  Jan 08, 2013  Aug 09, 2013
Printed
Page 391
Sentence just above the NOTE (itself just above the Register a Custom Service section)

The attribute name is incorrect.

"The three parameters that are passed into the AifCollectionAttribute constructor are ..."

The correct name for the attribute is AifCollectionTypeAtrribute.

Rick Pierson  Jan 08, 2013  Aug 09, 2013
Printed
Page 410
3rd paragraph

Minor typo. The first sentence of the 3rd paragraph has near its end, "... of a custom service was discussed in a previous example ..."

There is more than one way to correct it; one way would be to add the word "that":

"... of a custom service THAT was discussed in a previous example ..."


Note from the Author or Editor:
In the first sentence of the third paragraph of page 410, please add the word "that" after "of a custom service," as the customer suggests.

Rick Pierson  Dec 17, 2012  Aug 09, 2013
Printed
Page 422
Last paragraph of Write Tier-Aware Code

There is a disagreement between pages 420 and 422.


In the last paragraph on page 420 we are told:

"To avoid these round-trips, mark the RunBase class to run on Called From, meaning that it will run on either [the client or the server] tier. Then mark the construct method for the RunBase class or the menu item to run on the server. Called From enables the RunBase framework to marshal the class back and forth between the client and the server ... Keep in mind that you must implement the pack and unpack methods in a way that allows this serialization to happen."


But then in the last paragraph of the Write Tier-Aware Code section on page 422 we are told:

"Note that if you mark classes to run on either the client or the server [by setting RunOn to Called From], you can't serialize them to another tier using the pack and unpack methods."

Note from the Author or Editor:
Please change the sentence on page 422 to the following:

"Note that if you mark classes to always run on either the client or the server by setting the RunOn property to either Client or Server, you can't serialize them to another tier by using the pack and unpack methods."

Rick Pierson  Jan 15, 2013  Aug 09, 2013
Printed
Page 429
X++ code (first method near top of page)

The X++ SQL command "select" is misspelled as "elect".

There are 2 select commands in the X++ code: it is the second one, which is not part of the insert_recordset command but is instead a standalone SELECT, that is the middle statement in the following ...

ttsCommit;
elect count(RecId) from insertInventTableInventSum;
info(int642str(insertInventTableInventSum.RecId));

Note from the Author or Editor:
At the end of the first code block on page 429, please change "elect" to "select" as follows:

select count(RecId) from insertInventTableInventSum;
info(int642str(insertInventTableInventSum.RecId));

Rick Pierson  Dec 17, 2012  Aug 09, 2013
Printed
Page 438
Next to last paragraph, just below the X++ code

"The number of round-trips and INSERT statements executed [when using a RecordSortedList object] is the same as for the RecordInsertList object."

For RecordSortedList the number of round trips is exactly 1: all the records are buffered in the object until the call to the insertDatabase method is executed.

For RecordInsertList the number of round trips can be more than 1: when the add method is called the runtime checks the number of records in the object and if there are enough the buffer is flushed, inserting the records into the database. This flushing could occur many times before the call to the insertDatabase is executed (which then would insert whatever records remain in the object's buffer).

Note from the Author or Editor:
Please remove the following sentence from page 438:

"The number of round-trips and INSERT statements executed is the same as for the RecordInsertList object."

Rick Pierson  May 24, 2013  Aug 09, 2013
Printed
Page 442
Last paragraph, first sentence

The first sentence of the last paragraph uses back-to-back redundant words ("because since").

"... if you need to use aggregation and group by in queries, because since the update_recordset .."

Note from the Author or Editor:
On page 442, in first sentence of the last paragraph, please remove the word "since."

Rick Pierson  Dec 17, 2012  Aug 09, 2013
Printed
Page 463
Bolded bullet point for "Timeout for user modified queries"

Typo.

"A setting of 0 means that HERE is no timeout."

should be:

"A setting of 0 means that THERE is no timeout."

Note from the Author or Editor:
In the third bullet point at the beginning of page 463, please change the word "here" to "there."

Rick Pierson  Dec 19, 2012  Aug 09, 2013
Printed
Page 498
Sentence just above the putToDialog() code

The name of the function is putToDialog(), but the sentence just above the code calls it putFromDialog().

"The overridden putFromDialog [<- should be putToDialog] method transfers the contents of operation input parameters to dialog box controls."

Rick Pierson  Dec 28, 2012  Aug 09, 2013
Printed
Page 510
Image for figure 14-14

The image is of the wrong form.

1) The text under Figure 14-14 explicitly states that the image in Figure 14-14 is an Infolog window.

2) The sentence just above Figure 14-14 indicates the image is of an Infolog window (like that in Figure 14-13 on page 509) that shows the operation ran in a CLR session.

However, the image in Figure 14-14 is not an Infolog window, and it also does not show that the operation ran in a CLR session. Instead, if is an image of the Batch Job dialog (from which you must click Log in order for the Infolog to appear).

Note from the Author or Editor:
Please remove the sentence introducing Figure 14-14, the figure itself, and the caption. Because Figure 14-14 is the last figure in the chapter, it shouldn't cause numbering problems.

Rick Pierson  Jan 23, 2013  Aug 09, 2013
Printed
Page 512
Last code example on page (just above Pack-Unpack Pattern heading)

The second closing parenthesis is missing.

The book has: if (!prmIsDefault(_code)

It should be: if (!prmIsDefault(_code))

Rick Pierson  Jan 24, 2013  Aug 09, 2013
Printed
Page 617
Last sentence

The last sentence on the page is, "For an example of how to use canGoBatchJournal." That is the entire sentence. It does not give an example, nor does it say where to find an example; and the next page starts somethig new.

Note from the Author or Editor:
On page 617, please remove the sentence fragment "For an example of how to use canGoBatchJournal."

Is is the last sentence on the page.

Rick Pierson  Nov 29, 2012  Dec 21, 2012
Printed
Page 629
Last sentence above heading Configure AOS for Batch Debugging

The sentence twice splits the word "stepping" into "step ping".

"You can open these files in Visual Studio to set breakpoints and perform common tasks, such as step ping into and step ping over."

Rick Pierson  Jan 23, 2013  Aug 09, 2013