In general, subscribers have to be put in codeunits. There are a few performance considerations that you should keep in the back of your minds, when designing such a codeunit.
https://alguidelines.dev/docs/bestpra...
Contents
0:00 (Introduction);
0:54 (Keep the codeunit as small as possible);
1:43 ( Work with a single instance codeunit);
4:19 ( Only subscribe when necessary);
6:23 (Avoid generic OnInsert/OnModify/OnDelete triggers);
7:35 (Conclustion);
#businesscentral #msdyn365bc #video #alprogram