For most developers, modifying standard code (or that supplied from a third party) is the most common task. It isn't sufficient to make a piece of code functionally correct. We have to ensure that the code is maintainable and has a minimal effect on future upgrades. This chapter covers this in the following topics:
Any change we make that alters any element that is in a lower layer is effectively a modification. The terms customization and modification are used to imply the level of change, and somehow a customization has a lower impact. Customizations are often used to describe changes to the user interface, such as moving buttons into a more logical order for the organization.
This is a huge misconception; changes to forms are often the most time-consuming to upgrade, especially when changes are made to the form's code. One key aim we should adhere to when modifying code supplied by our VAR, ISV, or Microsoft is to ensure that further updates are easy to apply. We do this by the following:
The last point is relevant to any development, but in the case of standard logic, the impact is often greater, as these are often more widely used across an organization. An example of a hard-coded business rule is as follows: place all export sales orders on hold for hold type AUTH
.
Our role is to provide the ability for these rules to be implemented. Writing the rules in code often leads to them be changed frequently, as the business evolves, and therefore increases the cost of ownership and risk of regression elsewhere.
The request is a reasonable requirement, but the solution should use a table to store the conditions for placing the order on hold. Even making the hold type a parameter (for example, in the SalesParameters
table) will most likely not be enough. Various exceptions will arise, resulting in a large, hard-to-read if
statement.
3.143.254.90