cancel
Showing results for 
Search instead for 
Did you mean: 

Document_Lines Draft Document - LineTotal 0, Weight1 0

Former Member
0 Kudos

Hi,

I am developing a DI API Addon that generates Invoices Draft.

After have attached a new line with this code:

objInv.ItemCode = objDel.Lines.ItemCode

objInv.Lines.Quantity = objDel.Lines.Quantity

I would like to have che Weight1 and the LineTotal but they are 0.

When are they calculated?

Thank you

Andy

Accepted Solutions (1)

Accepted Solutions (1)

AlexGrebennikov
Active Contributor
0 Kudos

Hi Andy!

These properties are calculated by inner SAP logic, so you shouldn't set them on your own.

You can find a good sample how to create docs based on other at ..\SAP Business One SDK\Samples\COM DI\VB.NET\5.OrderAndInvoice\

if you really need that data <i>before</i> you add document, then you should simulate SAPlogic, i.e. calculate them on your own and make some supplements

Former Member
0 Kudos

Unfortunately I don't find this example.

Where can I download them?

Do you confirm that only after saving I can get these values?

AlexGrebennikov
Active Contributor
0 Kudos

Andy, SAP-gurus told that at

FYI: to find samples you should install SDK

Answers (1)

Answers (1)

Former Member
0 Kudos

I have to collect the total weigh of the invoice and the total before taxation for then apply two different kinds of supplement but all these field are at 0.

Do they come populated when I add it?

I would like to add the lines of supplement (that are particular articles ) before saving the entire document.

Thank you