Take data from other document

For students who study 1C Junior course.

#1
People who like this:0Yes/0No
Interested
Rating: 10
Joined: Sep 30, 2020
Company: Nortek Bilişim

Hello,

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?

Download Codes.PNG (22.97 KB)
 
#2
People who like this:0Yes/0No
Active user
1C:Professional
Rating: 6
Joined: May 8, 2013
Company: 1C Company

Few comments:

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.

Edited: Konstantin Rupasov - Nov 04, 2020 01:37 AM
 
#3
People who like this:0Yes/0No
Interested
Rating: 10
Joined: Sep 30, 2020
Company: Nortek Bilişim

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).

Download Page.PNG (17.45 KB)
Edited: Mesut Kahraman - Nov 04, 2020 01:21 PM
 
#4
People who like this:0Yes/0No
Interested
Rating: 10
Joined: Sep 30, 2020
Company: Nortek Bilişim

I have added dump of the application.

 
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.