BPM Update not allowed, Engineered and Prevent Change

I am attempting to change an engineered and release job from a BPM. By unchecking both fields. I performed a trace and tracked down the dataset, fields, and business objects. However, on calling the BO update, I get the error message: “Update not allowed, Engineered and Prevent Change”

I use BO JobEntry method GetByID to acquire the Job dataset.
Then I call the method ChangeJobHeadJobReleased, ChangedJobHeadJobEngineered, and Update.

When I changed the company configuration> production> Job> Change Engineered Jobs>, by unchecking “Prevent changes” the BPM does not report any error.

How can I make my BPM work without changing the company configuration?

Did you trace the whole process of changing a Released Job? I thought there was a pop-up that asked for details of the change (if I am remembering correctly). You would have to also provide something to satisfy that requirement.

Yes I traced the ds changes. I did for the audit log description. The problem is during the update method the reported error occurs. But when I changed the company configuration> production> Job> Change Engineered Jobs>, by unchecking “Prevent changes” the BPM does not report any error.

See Trace changes below:


<businessObject>Erp.Proxy.BO.JobEntryImpl</businessObject>
  <methodName>ChangeJobHeadJobReleased</methodName>
  <appServerUri>/</appServerUri>
  <returnType>System.Void</returnType>
  <localTime>4/19/2023 16:35:27:9221117 PM</localTime>
  <threadID>1</threadID>
  <correlationId>64b2cf17-d787-477f-82d9-7865df18d8a2</correlationId>
  <executionTime total="31" roundTrip="8" channel="0" bpm="0" other="23" />
  <retries>0</retries>
  <parameters>
    <parameter name="ds" type="Erp.BO.JobEntryDataSet">
      <JobEntryDataSet xmlns="http://www.epicor.com/Ice/300/BO/JobEntry/JobEntry" />
    </parameter>
  </parameters>
  <paramDataSetChanges>
    <paramDataSet name="ds" useDataSetNbr="0">
      <changedValue tableName="JobHead" rowState="Modified" rowNum="0" colName="JobReleased"><![CDATA[False]]></changedValue>
      <changedValue tableName="JobHead" rowState="Modified" rowNum="0" colName="UD_SysRevID"><![CDATA[System.Byte[]]]></changedValue>
    </paramDataSet>
  </paramDataSetChanges>
</tracePacket>

<tracePacket>
  <businessObject>Erp.Proxy.BO.JobEntryImpl</businessObject>
  <methodName>ChangeJobHeadJobEngineered</methodName>
  <appServerUri>net.tcp://rsi-eapp/EpicorERPTest/</appServerUri>
  <returnType>System.Void</returnType>
  <localTime>4/19/2023 16:35:29:6515735 PM</localTime>
  <threadID>1</threadID>
  <correlationId>094f8a00-b72b-4d31-9412-ca480bfe6abe</correlationId>
  <executionTime total="34" roundTrip="17" channel="0" bpm="0" other="17" />
  <retries>0</retries>
  <parameters>
    <parameter name="ds" type="Erp.BO.JobEntryDataSet">
      <JobEntryDataSet xmlns="http://www.epicor.com/Ice/300/BO/JobEntry/JobEntry" />
    </parameter>
  </parameters>
  <paramDataSetChanges>
    <paramDataSet name="ds" useDataSetNbr="0">
      <changedValue tableName="JobHead" rowState="Modified" rowNum="0" colName="JobEngineered"><![CDATA[False]]></changedValue>
      <changedValue tableName="JobHead" rowState="Modified" rowNum="0" colName="JobReleased"><![CDATA[False]]></changedValue>
      <changedValue tableName="JobHead" rowState="Modified" rowNum="0" colName="RowMod"><![CDATA[U]]></changedValue>
      <changedValue tableName="JobHead" rowState="Modified" rowNum="0" colName="UD_SysRevID"><![CDATA[System.Byte[]]]></changedValue>
    </paramDataSet>
  </paramDataSetChanges>
</tracePacket>

<tracePacket>
  <businessObject>Erp.Proxy.BO.JobEntryImpl</businessObject>
  <methodName>Update</methodName>
  <appServerUri>/</appServerUri>
  <returnType>System.Void</returnType>
  <localTime>4/19/2023 16:35:29:7091448 PM</localTime>
  <threadID>1</threadID>
  <correlationId>3fcba7e6-a1a0-47cb-87bf-bf98cd772ac7</correlationId>
  <executionTime total="172" roundTrip="150" channel="0" bpm="0" other="22" />
  <retries>0</retries>
  <parameters>
    <parameter name="ds" type="Erp.BO.JobEntryDataSet">
      <JobEntryDataSet xmlns="http://www.epicor.com/Ice/300/BO/JobEntry/JobEntry" />
    </parameter>
  </parameters>
  <paramDataSetChanges>
    <paramDataSet name="ds" useDataSetNbr="0">
      <changedValue tableName="JobHead" rowState="Modified" rowNum="0" colName="JobEngineered"><![CDATA[False]]></changedValue>
      <changedValue tableName="JobHead" rowState="Modified" rowNum="0" colName="JobReleased"><![CDATA[False]]></changedValue>
      <changedValue tableName="JobHead" rowState="Modified" rowNum="0" colName="EnableJobFirm"><![CDATA[False]]></changedValue>
      <changedValue tableName="JobHead" rowState="Modified" rowNum="0" colName="EngineerAllowed"><![CDATA[True]]></changedValue>
      <changedValue tableName="JobHead" rowState="Modified" rowNum="0" colName="HeaderSensitive"><![CDATA[True]]></changedValue>
      <changedValue tableName="JobHead" rowState="Modified" rowNum="0" colName="RowMod"><![CDATA[U]]></changedValue>
      <changedValue tableName="JobHead" rowState="Modified" rowNum="0" colName="UD_SysRevID"><![CDATA[System.Byte[]]]></changedValue>
    </paramDataSet>
  </paramDataSetChanges>
</tracePacket>

Did you found any work around by not disabling the options in the company configuration?

Did you/or anyone find a way to unengineer/unrelease jobs using a BPM? I am running into the same challenges!

Yes. I used the following code:

String vJobNum = callContextBpmData.Character20;
int vOrderNum = Convert.ToInt32(callContextBpmData.Number20);

// Declare svc as Assembly for JobEntry BO service.
var svc = Ice.Assemblies.ServiceRenderer.GetService<Erp.Contracts.JobEntrySvcContract>(Db); //Instanciated Server Side

// Uncheck Released and Engineered

// Get the Job DataSet using GetByID method
var dsv = svc.GetByID(vJobNum);

//var dsv = svc.GetDatasetForTree(vJobNum,0,0,false,"MFG,PRJ,SRV");

// Set JobRelease to false
dsv.JobHead[0].JobReleased=**false**;
// Set the row mode to update
dsv.JobHead[0].RowMod="U";
svc.ChangeJobHeadJobReleased(**ref** dsv);

// Set JobEngineered to false
dsv.JobHead[0].JobEngineered=**false**;
svc.ChangeJobHeadJobEngineered(**ref** dsv);

// Set discovered fields from trace accordingly.
dsv.JobHead[0].EnableJobFirm=**false**;
dsv.JobHead[0].EngineerAllowed=**true**;
dsv.JobHead[0].HeaderSensitive=**true**;

// Set Synchronize Req by Date With Demand Links field
dsv.JobHead[0].SyncReqBy=**true**;

// MGA - 12/12/2023
// save the dsv because Epicor will get cleared by the update and we would endup lossing the contents of the JobHeadAttch dataset table.
var dsv_save = dsv;

// Update the job
svc.Update(**ref** dsv);
// return;

Check out this thread from the last couple days. It covers basically the same issue.

My explanation (and solution) starts here:

Thank you for this. I will review the link.