Job Costing Customer

Discussions relating to breakout scripting, .NET and COM programming with Jiwa objects.

Job Costing Customer

Postby neil.interactit » Mon Nov 30, 2015 2:28 pm

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.
neil.interactit
Kohai
Kohai
 
Posts: 227
Joined: Wed Dec 03, 2014 2:36 pm
Topics Solved: 6

Return to Technical / Programming

Who is online

Users browsing this forum: No registered users and 5 guests