This is a continuation/ resurrection of
Yes, hardcoding has its downfalls, and data driven solutions are more elegant and often(but not always) more extensible.
But a sufficiently documented “quick and dirty” hardcoded solution could be acceptable, and less prone to feature creep.
Take the request to limit a part to a specific customer.
The elegant solution would require adding a UD field to part table to hold the CustNum, Regen of the DB, a BAQ to find the CustNum for a given CustID, a customization of Part Maint to allow selecting the Customer, a BPM to halt saving a line with an invalid part / customer combo, training whomever is going to maintain that field in Part Maint, trainingng order entry what the exception message they’ll see means, etc…
The quick and dirty is to make the BPM that stops saving a line based on the hard coded combo of partnum and custnum, training order entry about the exception message they may see.
The obvious argument for the elegant solution is that someone else can now set the specific customer for any given part. As opposed to development having to tweak the BPM when a new partnum/customer combo is needed.
But that elegant solution has some obvious limits. Ones that require an entirely new solution. More than just a revision of the original one.
The example that comes to mind is when the powers that be decide there needs to be more than one customer that can buy that part. Might be the same customer, just one that is implemented as multiple customer entries. Or maybe that customer wants you to sell direct to certain distributors of theirs. Now your solution needs to be torn down an implemented in a manor with a one-to-many relationship (I.e. a UD table with partnum and custnum as pairs of keys)
The hardcoded solution merely requires a tweak of of the condition widget - adding another row, setting AND/OR and parentheses.
I’d say it is acceptable to do the quick(and dirty) method if the request is, “Make it so that P/N ABC-123 can only be sold to ACME Corp”
Now if the request included, “… And we’ll want to be able to do this for other parts too.”. Then the elegant solution would be more appropriate. But don’t forget to ask if they might ever want to restrict the part to more than one customer.
Now let your hate flow through me.