Report 8621 "Config. Package - Process" needs event
From RapidStart there is a button called Process Data which calls Report 8621"Config. Package - Process". This report does nothing but does have examples of how to transform your rapidstart data before applying it. Currently the report requires a developer to uncomment a line of code to make the report usable as seen here: // Code sample of the text transformation on package data // ProcessCustomRulesExample("Config. Package Table"); //Need to uncomment this line for the report to do anything
This won't work in AL for numerous reason since we cannot touch the base code in this report. So I think 2 things need to be done to this report:
- Add an event to the OnAfterGetRecord where we can add our Custom Rules (maybe call it OnAfterGetConfigPackageTableCustomRule). Make sure IncludeSender is Yes so we have access to the ApplyTextTransformation function in the report itself.
- Make the ApplyTextTransformation Function Global so it can be seen and used in the Sender variable in the subscription
Report 8621 will publish the event OnBeforeTextTransformation() that returns two temp tables:
- TempField - table and field numbers that requires transformation,
- TempTransformationRule - the transformation rule to apply, where "Code" is equal to the respective TempField."No.".
Added the external method AddRuleForField() that results in an inserted field and a related transformation rule. This method is to be used in the subscriber code. The inserted rule can be adjusted if it requires additional parameters, e.g. we want to replace 'Mister' with 'Mr.' in the customer names:
ConfigPackageProcess.AddRuleForField(
DATABASE::Customer,Customer.FIELDNO(Name),
TempTransformationRule."Transformation Type"::Replace,TempField,TempTransformationRule);
TempTransformationRule."Find Value" := 'Mister';
TempTransformationRule."Replace Value" := 'Mr.';
TempTransformationRule.MODIFY;
In case the subscriber is not active, there will be the message as before:
Implement processing logic for Table 18 in Report 8621