Jump to content

Sage 50 SDO - Editing existing Invoice Line Item


 Share

Recommended Posts

Hi

We're trying to write some .net code to change the nominal of lots of invoices that were created with line items using the incorrect nominal code.

Ive tried something like the following ... but even though the UPDATE is successful the record is not updated.

Anyone know what steps are required to edit an existing invoice line item?

            Find the InvoiceRecord

            oInvoiceRecord.Edit

            Link the InvoiceItem  ....... oInvoiceItem = oInvoiceRecord.Link

              oInvoiceItem.MoveFirst()

              oInvoiceItem.Fields.Item("NOMINAL_CODE").Value    =  "4000"

             oInvoiceRecord.Update() 

 

 

I've also tried  

             oInvoiceItem.Open(OpenMode.sdoReadWrite)

             oInvoiceItem.Fields.Item("NOMINAL_CODE").Value    =  "4000"

            oInvoiceItem.Write(0)

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...