HOW TO CLOSE SALES ORDER THROUGH CODE

By | April 15, 2020

Sometime we may come under a situation where we have to close the sales order through code.

Keyword DIVSOHCLE is used to close the sales order record.

For example:

Below is a sales order which we have to close through our code.

           Fig1:  Sales order record

Use the keyword as below:

Fig2: Keyword

Pass the sales order number as the parameter and run the code.

Check the sales order code once the code is process, you will find the sales order get closed completely and we won’t be able modify the record.

Fig3: Closed order

As DIVSOHCLE is used to close the sales order completely DIVSOQCLE is used to close the particular lines of sales order.

Hence, with the help of above keyword we can manage ho to close the sales order I.e completely or partly.