ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

Missing fields when creating orders from quotations with the "Create Order" function, which do not have a customer.

Open FSharpCSharp opened this issue 8 years ago • 3 comments

If you create a new order using the "Create Order" function and there was no customer in the original quotation, the system asks whether a new customer is created. If you confirm this with Yes, a new customer number is created from existing templates and then the new customer number is entered for all existing quotations. This works via Table 5050 in the "UpdateQuotes" function. However, several problems can arise here. The "Sell-To Customer No." and "Bill-To Customer No." are inserted but not validated. As a result, some fields in the sales header are not updated, such as the "Invoice Disc. Code". This exists in the newly created customer, but not in the original quote, and then not in the newly created sales order. This can have fatal consequences in postprocessing if some fields are not validated and information is simply missing. The error affects not only the current Business Central version, but also all NAV versions that are still supported. Here, too, a correction should be made.

FSharpCSharp avatar Aug 01 '18 07:08 FSharpCSharp

Hi FSharpCSharp, can we have a discussion on the issue you raised? You are talking about VALIDATE of "Sell-to"/"Bill-to" fields for existing quotes. If we take a look at the code of these VALIDATEs we see:

  • there are some other VALIDATEs of other fields which can call another VALIDATEs
  • some important fields such as posting groups are filled Now let's assume the situation when user after selecting customer template started to adjust some fields on quotes. It can be currency, posting groups and so on. After user creates order from one of the quotes all other quotes will be updated. If they will be updated as you ask with VALIDATEs of "sell-to"/"bill-to" then some fields will be overwritten with the new data, including posting groups. And finaly existing quotes can even be vice versa to their previous versions. I don't think this is a good idea. What do you think about this?

RomanZanizdra avatar Sep 25 '18 11:09 RomanZanizdra

I'd say that's a matter of opinion. We have already been approached by various customers about this problem, and always had to intervene in the standard to solve this problem. On the basis of your arguments, you could always give this reasoning if you find something wrong. As a rule, it is not enough to just fill in a few fields, and everything is fine. And here really so few fields are filled that it comes in the postprocessing process to errors, which developed on basis of this programming. And here our customers rightly say that it can't be that if you use a system function, then any other processes that are contained in the pure standard no longer work. I would therefore be careful to demonize everything immediately and to look at the whole thing from the customer's point of view.

FSharpCSharp avatar Sep 25 '18 11:09 FSharpCSharp

There are two new events provided. OnAfterModifySellToCustomerNo(VAR SalesHeader : Record "Sales Header";VAR SalesLine : Record "Sales Line") OnAfterModifyBillToCustomerNo(VAR SalesHeader : Record "Sales Header";VAR SalesLine : Record "Sales Line")

RomanZanizdra avatar Nov 02 '18 08:11 RomanZanizdra