Hi it_q-lab , The history object that you would need to use is the AR_InvoiceHistoryInquiry_bus this will have a handle to the detail lines as well called .Detail_Object. Unfortunately, you need to use the business objects to get to the line details. So, you'd need to change your script slightly... error_code = 0 invoice_number = "12827E" invoice_type = "" confirm_to = "" SET oS = oSession.AsObject(oSession.GetObject(" AR_InvoiceHistoryInquiry_bus ")) retval = oS.SetKeyValue("InvoiceNumber$", invoice_number) retval = oS.SetKeyValue("HeaderSeqNo$", "000000") retval = oS. SetKey() ' should check for retVal=1 here as any other value will indicate that the record does not exists error_code = oS.GetValue("UDF_TYPE$", invoice_type) error_code = oS.GetValue("ConfirmTo$", confirm_to) msgbox(invoice_type) msgbox(confirm_to) Give that a try. Hope it helps you get started. Elliott
↧