Hi Fabian,
IT WORKS! But it wasn't as simple as that. Here was the rest of the journey:
I changed
MyDoc = GetDocumentFromSelfRelation();
to MyDoc = MyDoc.GetDocumentFromSelfRelation(); and didn't get an error but I was still getting the
"Object reference not set to an instance of an object" error so I went through and commented out all the lines one-by-one until I found that the error was caused by this line:
DocumentIndexFieldTable tableField = (DocumentIndexFieldTable)MyDoc.Fields.FirstOrDefault(f => f.FieldName == "GL Account Distribution").Item;
I figured that it must be something to do with the field name because the only name I could find to use in the Configurations->Database Fields was "GL Account Distribution" but that doesn't look like a system name and we're always using a field's system name in web services. A field's system name is usually visible when you click on the field itself, click on 'more options' and then use the 'Database column' value, but unfortunately table fields don't have that display so I took a guess and put underscores between the words and that got me past the "Object reference not set to an instance of an object" error!
Unfortunately, I was still getting an error which is "There was an error generating the XML document.". I commented-out this line and got rid of the error:
MyDoc.PutToFieldsRelationForDocumentIndexFields(updatedTableIndexFields);
I thought maybe it had something to do with the data I was writing to the table so I zero'd in on the Amount column as potentially being the problem because we'd already established that even though it's a Decimal datatype it still wanted the value passed as a string. So I changed the ItemChoiceType setting from ItemChoiceType.Decimal to ItemChoiceType.String and everything worked!
tldr; even though a column is a Decimal datatype you still have to treat it like a String
(any chance someone can update the kb article to save others a lot of grief?)