Page 1 of 1

Job Costing Customer

PostPosted: Mon Nov 30, 2015 2:28 pm
by neil.interactit
Hi guys,

I am trying (unsuccessfully) to set the "Customer" field for a job costing record (from a debtor maintenance plugin). The code I have so far is:

Code: Select all
Private Sub SetJobCustomer(debtorId As String, jobId As String)
        If debtorId = "" Or jobId = "" Then Return
        Dim job As New JiwaJobCosting.Job()
        job.ReadRecord(job.ReadModes.ActualRecord, job.SeedTypes.RecID, jobId)
        job.DebtorID = debtorId
        job.SaveRecord()
    End Sub

But I get the error "Object reference not set to an instance of an object (Module: Clear)".

Can you set me straight?

Cheers,
Neil.