Try ERPNext Buy Support Partners Foundation

What is the "doctype" i should update after submitting a Sales Order?

I create a sales order and it stores in “tabSales Order” table, and

after that i will submit it. I want to know what happening through this process in erpNext.

i want fetch the data after submit, so what is the doctype i should call???

And what is the “doctype” i should update??? .

When I have wondered about such things I have compared before and after snapshots of a text dump of the database.

mysqldump db_name > backup-file.sql

from 4.5.4 mysqldump — A Database Backup Program

So you could do :

Create a Sales Order, then:

mysqldump db_name > backup-before.sql

Commit the Sales Order, then:

mysqldump db_name > backup-after.sql


diff backup-before.sql backup-after.sql

You will see many changes to do with maintaining user’s state, but finding the relevant changes to do with the commit will not be hard.

Don’t forget that there are far better differencing tools than diff. I have had excellent results with meld.

Hi martin,

thank you for replying me quickly. What i want to know.

I have a task to implement an endpoint for get the details of the particular a sales order after submitting sales order.

firstly we create a sales order and it will save as a draft in database. At that time system wouldn’t allow to make a delivery note or invoice.

After submitting that sales order it will allow to make the delivery note or invoice.

what i want know? i need get the details after submitting that particular sales order.

I think after submitting the sales order, that details also will save in Sales Order doctype. Am I correct or not???

When you commit a document like a Sales Order the individual sales order doc type is updated.

You are correct about that!

However, numerous other doc types will be updated as well. Stock quantities will be decremented, for example. If you want to get the broader details of your sales order you need to be able to find all the various affected doc types. Sales orders have many options. The user’s choice of options decides which other doc types are affected.

How do you find them?

What I described to you is the method I use to get the answer to that and many other similar questions.

Companies like SAP, PeopleSoft, etc. have the resources to fully document that sort of question.
ERPNext is a “do it yourself” (DIY) enterprise resources planning system for companies that cannot afford $1200/day/consultant in consulting fees.

(Because of that, much of the documentation you need shows up here in this forum, when members (like you) have a problem, find a solution, then explain what they did. [Solved] What's the right way to version control my customizations? is a good example of this.)

Since presumably you do not have those resources you will have to learn to do your own exploration. What I described is one technique I use. The most important thing is to learn to get your answers from the code base.