Rest-kinetic for JobClosingSvc

I am trying to make a panel card grid that can complete/uncomplete and close/open a job. Complete status is working, but close will not update using the same setup I used for complete. Also, curious to why my rest params does not have the same behavior as a BAQ where and return every job in vBAQ_View, instead only the selected job is queried.

Here’s what I’ve done:

BO Service Call view

metafx-panel-card-grid > Grid Model >
Ep Binding: JobHead
Provider Model >
Svc: Erp.BO.JobEntrySvc
Svc Path: GetList
Rest Params:
{
“WhereClause”: “JobNum = ‘??{vBAQ_View.JobHead_JobNum}’ BY JobNum”
}

Two events for OnChangeJobCompletion and OnChangeJobClosed:

Trigger >
Type: DataTable
Hook: Column Changed
Target: JobClosing
Columns: JobComplete/JobClosed

rest-kinetic > Rest Services >
Service Name: Erp.BO.JobClosingSvc
Service Operation: OnChangeJobCompletion/OnChangeJobClosed






An event to save complete/close changes made triggered by a button.


The only change I made to these rest-kinetic is the service operation, everything else is filled out like OnChangeJobCompletion and OnChangeJobClosed events.

I know nothing about application studio. But I made a function not too long ago for closing jobs. Here’s the code if you want to use it.
In my case for I never needed to complete a job without closing it. It was always being closed which also completes it.

The big issue I had was if the complete quantity <> prodqty then you need to set QuantityContinue = 1

you’ll need to change JobRow.Company and replace FUNCTIONINPUT with whatever you call it. The input for this would be your job number.

  Erp.Tablesets.JobClosingTableset JobTS = new Erp.Tablesets.JobClosingTableset();
  try
  {
      this.CallService<Erp.Contracts.JobClosingSvcContract> 
      (boJob => 
          {
              bool f = false;
              string b = "";
              DateTime now = DateTime.Now;
              
              JobTS = boJob.SelectJobByJobNum (**FUNCTIONINPUT**);          
              boJob.EnableSerialMatching (ref JobTS, out f);
             
              var JobRow = JobTS.JobClosing[0];
                JobRow.Company = "YOURCOMPANY";
                JobRow.JobClosed = true;
                JobRow.ClosedDate = now;
                JobRow.JobComplete = true;
                JobRow.JobCompletionDate = now;
                JobRow.JobNum = job;
                //JobRow.ProdQty = 1;
                JobRow.CompleteQty = JobRow.ProdQty;
                JobRow.QuantityContinue = 1;
                JobRow.RowMod = "U";
  
              boJob.OnChangeJobClosed (ref JobTS);
              boJob.PreCloseJob (ref JobTS, out f);
              boJob.CloseJob (ref JobTS, out b);
          }
      );  
  }
  catch 
  {
      output = "Dohh!";
  }