I have 2 documents as sales order(satış siparişi) and sales invoice(satış faturası).There is a sales order number in sales invoice and I want to do that when I select a sales order , its product description must be writen on sales invoice.
I have wrote some code but not true,How can I do this?
1. You don't need to pass Object (or any its attributes) from client to server. Object is a part of the form structure and it's accessible on the server side.
2. Why are you getting the document form, Mesut? You need SalesOrder data that lives in the database, not in the document form.
3. The best and the simplest way of implementing this kind of functionality lives on the Generation tab of document properties (see pic). Open the SalesInvoice document properties and add SalesOrder to the upper frame of the form. Then run the Wizard that will help you to write the code you need. Please, take some time to look at this code and understand what it does and how.
I have done what you say.I want to change sales invoice when I select sales order.Because of this I called generation codes in onChange method document form of sales invoice document.But I dont know how must I fill in filling function(see the picture).