Thanks for the input. I had thought of updating the JobEntry object
but when I googled around I found that the information indicating
you need to reference the JobClosing object (at least in previous
versions). I have the following code which runs but something is
missing because the CloseJob method does not appear to be closing
anything. Any additional help is appreciated.<br>
<br>
Thanks,<br>
Tanner<br>
<br>
var messageTextBuilder = new System.Text.StringBuilder();<br>
string mymsg = string.Empty;<br>
bool ftime = true;<br>
bool needinput = false;<br>
<br>
var jobsclose = ttResults.Where(row => !row.Unchanged()
&& row.Calculated_CloseJob == true);<br>
foreach(var job in jobsclose)<br>
{<br>
   var jobclosesvc =
Ice.Assemblies.ServiceRenderer.GetService<Erp.Contracts.JobClosingSvcContract>(Db);
   var thisds = new Erp.Tablesets.JobClosingTableset();
  Â
  Â
messageTextBuilder.Append(string.Format("Job={0}",job.StockJobsDBD_JobNum));
   jobclosesvc.GetNewJobClosing(ref thisds);
   jobclosesvc.OnChangeJobNum(job.StockJobsDBD_JobNum,ref
thisds,out mymsg);
   if (mymsg != "")
   {
     Â
messageTextBuilder.Append(string.Format("\rMessage={0}",mymsg));
   }
   else
   {
      jobclosesvc.OnChangeJobCompletion(ref thisds);
      jobclosesvc.OnChangeJobClosed(ref thisds);
      jobclosesvc.PreCloseJob(ref thisds,out needinput);
  Â
    if (needinput == true) {
         messageTextBuilder.Append(string.Format("\rNEEDS
INPUT",mymsg));
    } Â
    else
      {
      jobclosesvc.CloseJob(ref thisds,out mymsg);
      }
   }
   thisds = null;
   jobclosesvc = null;
}
var messageText = messageTextBuilder.ToString();
this.PublishInfoMessage(messageText,
Ice.Common.BusinessObjectMessageType.Information,
Ice.Bpm.InfoMessageDisplayMode.Individual, "JobClosingDashboard",
"Update");
<blockquotetype=“cite”> Â
<div id="ygrps-yiv-1776584805ygrp-text"> <p> </p> <div class="ygrps-yiv-1776584805WordSection1"> <p class="ygrps-yiv-1776584805MsoNormal"><span
style=“font-size:11.0pt;color:#1F497D;”>I think you
could use the job entry object and the generated bpm
and update the closed checkbox and that would run the
normal processes.
Â
Be sure add
all of the key fields for all of the tables to be
updated and should work.
Â
From: vantage@yahoogroups.com
[mailto:vantage@yahoogroups.com]
Sent: Tuesday, January 26, 2016 2:25 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Job Closing BPM
Â
Â
I am trying to create an updatable dashboard to
close jobs and running into issues with an
advanced BPM. I have looked through the
JobClosing DLLs and cannot locate syntax that
builds the JobClosing.DataSet I need to pass into
the CloseJob method. Can anyone help point me in
the right direction or have syntax they would be
willing to share?
Thanks,
Tanner
CONFIDENTIALITY NOTICE
The information contained in this communication,
including attachments, is privileged and confidential.
It is intended only for the exclusive use of the
addressee. If the reader of this message is not the
intended recipient, or the employee or agent
responsible for delivering it to the intended
recipient, you are hereby notified that any
dissemination, distribution or copying of this
communication is strictly prohibited. If you have
received this communication in error, please notify us
at 727-578-6240 and immediately delete the
communication.
"This (document/presentation) may contain technical
data as defined in the International Traffic In Arms
Regulations (ITAR) 22 CFR 120.10. Export of this
material is restricted by the Arms Export Control Act
(22 U.S.C. 2751 et seq.) and may not be exported to
foreign persons without prior approval form the U.S.
Department of State."
</blockquote>
<br>