Very nice post! Maybe small remark that in example function PrepareRecord for the purchase header the SalesHeader.GetReportSelectionUsage is used to assign 'ReportSelecitonUsage' variable instead of the purchase header's one. Even smaller remark is the spelling of ReportSelecitonUsage, but who doesn't type typo's :-).