Quantcast
Channel: Sage 100
Viewing all articles
Browse latest Browse all 37010

Forum Post: BOI - Create a new invoice AP Invoice Data Entry

$
0
0
Hi, I am using BOI to insert a record in AP Invoice Data Entry and add the lines to it. Here is my code to connect to AP Invoice Data Entry table. The Username, Password and the Company name are set globally in another function. Since there is no error I assume the bus used is correct. Dim liStatus As Integer Dim lsError As String liStatus = gpDispatch.nSetModule("A/P") lsError = gpDispatch.sLastErrorMsg If liStatus = 0 AndAlso lsError String.Empty Then Throw New System.Exception(lsError) End If 'security Dim liTask As Integer = gpDispatch.nLookupTask("AP_Invoice_ui") liStatus = gpDispatch.nSetProgram(liTask) lsError = gpDispatch.sLastErrorMsg If liStatus = 0 AndAlso lsError String.Empty Then Throw New System.Exception(lsError) End If liStatus = gpDispatch.nSetDate("A/P", DateTime.Now.ToString("yyyyMMdd")) lsError = gpDispatch.sLastErrorMsg If liStatus = 0 AndAlso lsError String.Empty Then Throw New System.Exception(lsError) End If gpInvoiceHeader = gpScript.NewObject("AP_Invoice_bus", gpDispatch) If IsDBNull(gpInvoiceHeader) Then lsError = gpDispatch.sLastErrorMsg If lsError String.Empty Then Throw New System.Exception(lsError) End If End If Can any of you post the code snippet to add a record in the AP Invoice Data Entry? Thank you in advance.

Viewing all articles
Browse latest Browse all 37010

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>