Skip to Content
0
Former Member
Nov 27, 2006 at 06:08 PM

Updating Price property of Order lines

78 Views

Hello,

i can't update Price property of order.

I'm creating a new order document and Add method returns 0 but when I open the document from SAP B1 i see no value in the price column.

Here is the code...

'....
            With oDoc.Lines

                'Articolo...
                If txtArticolo.Value.Trim <> "" Then
                    GetInfoRigaOfferta(GetQuotationDocEntry(), txtArticolo.Value, nQuotLineNumber, nQuotPrice)

                    .ItemCode = txtArticolo.Value
                    .Quantity = Val(txtQuantitaMC.Value) * 10
                    .UserFields.Fields.Item("U_CR_MCRICH").Value = Val(txtQuantitaMC.Value)
                    If nQuotLineNumber = -1 Then
                        bCreaArticoloInOfferta = True
                    Else
                        .Price = nQuotPrice
                    End If
                End If
            End With

            nRetVal = oDoc.Add

Notice that nQuotLineNumber is <> -1

Thanks

Paolo