Hi Team,
I am trying to post A/R invoice batch after import,
i get an error on the underlined code below (Error HRESULT E_FAIL has been returned from a call to a COM component.).
any pointer to what i am doing wrong would be appreciated.
ARbatch.Fields.FieldByName("CNTBTCH").PutWithoutVerification(strBatchID) 'Batch Number
ARbatch.Read()
ARbatch.Fields.FieldByName("PROCESSCMD").PutWithoutVerification("1") ' Process Command
ARbatch.Process()
ARbatch.Fields.FieldByName("CNTITEM").PutWithoutVerification("-9999999") ' Entry Number
'ARheader.Browse("")
ARheader.Fetch()
ARdetail1.Read()
ARbatch.Fields.FieldByName("PROCESSCMD").PutWithoutVerification("2") ' Process Command
ARbatch.Process()
ARbatch.Fields.FieldByName("BTCHSTTS").Value = "7" ' // Batch Status
ARbatch.Update()
ARbatch.Fields.FieldByName("PROCESSCMD").PutWithoutVerification("0") ' // Process Command
ARheader.Fields.FieldByName("CNTITEM").PutWithoutVerification("-9999999") ' Entry Number
'ARheader.Browse("")
ARdetail1.Read()
ARIVPT.Fields.FieldByName("BATCHIDFR").PutWithoutVerification(strBatchID) ' // Post Batch From
ARIVPT.Fields.FieldByName("BATCHIDTO").PutWithoutVerification(strBatchID) ' // Post Batch To
ARIVPT.Process()
ARbatch.Read()
ARheader.Fields.FieldByName("CNTITEM").PutWithoutVerification("-9999999") ' Entry Number
'ARheader.Browse("")
ARheader.Fetch()
ARdetail1.Read()
I am trying to post A/R invoice batch after import,
i get an error on the underlined code below (Error HRESULT E_FAIL has been returned from a call to a COM component.).
any pointer to what i am doing wrong would be appreciated.
ARbatch.Fields.FieldByName("CNTBTCH").PutWithoutVerification(strBatchID) 'Batch Number
ARbatch.Read()
ARbatch.Fields.FieldByName("PROCESSCMD").PutWithoutVerification("1") ' Process Command
ARbatch.Process()
ARbatch.Fields.FieldByName("CNTITEM").PutWithoutVerification("-9999999") ' Entry Number
'ARheader.Browse("")
ARheader.Fetch()
ARdetail1.Read()
ARbatch.Fields.FieldByName("PROCESSCMD").PutWithoutVerification("2") ' Process Command
ARbatch.Process()
ARbatch.Fields.FieldByName("BTCHSTTS").Value = "7" ' // Batch Status
ARbatch.Update()
ARbatch.Fields.FieldByName("PROCESSCMD").PutWithoutVerification("0") ' // Process Command
ARheader.Fields.FieldByName("CNTITEM").PutWithoutVerification("-9999999") ' Entry Number
'ARheader.Browse("")
ARdetail1.Read()
ARIVPT.Fields.FieldByName("BATCHIDFR").PutWithoutVerification(strBatchID) ' // Post Batch From
ARIVPT.Fields.FieldByName("BATCHIDTO").PutWithoutVerification(strBatchID) ' // Post Batch To
ARIVPT.Process()
ARbatch.Read()
ARheader.Fields.FieldByName("CNTITEM").PutWithoutVerification("-9999999") ' Entry Number
'ARheader.Browse("")
ARheader.Fetch()
ARdetail1.Read()