Trying to change a part number in QuoteMtl via data directive bpm c# code but get an error: QuoteMtl record is not avaialble

QuoteMtl record is not avaialble error when trying to run the below code in a data directive bpm.

Please help!!!

Thanks,

Richard

CallService<Erp.Contracts.QuoteSvcContract>(qmc =>
    qmc.GetPartXRefInfo(ref pn, System.Guid.Parse("00000000-0000-0000-0000-000000000000"), "", ref uomcode, out sw, out qs, out mm)
);

PublishInfoMessage(sw.ToString(), Ice.Common.BusinessObjectMessageType.Information, Ice.Bpm.InfoMessageDisplayMode.Individual, "", "");
PublishInfoMessage(qs.ToString(), Ice.Common.BusinessObjectMessageType.Information, Ice.Bpm.InfoMessageDisplayMode.Individual, "", "");
PublishInfoMessage(mm.ToString(), Ice.Common.BusinessObjectMessageType.Information, Ice.Bpm.InfoMessageDisplayMode.Individual, "", "");

st = "QuoteMtl";
sourceSysRowID = System.Guid.Parse("DFFB9512-86C9-4DEC-8A91-FFC4AEB72BF0");

CallService<Erp.Contracts.QuoteAsmSvcContract>(qmc =>
    qmc.CheckPrePartInfo(ref pn, st, sourceSysRowID, out vm, out vs, out vmt, out pc)
);

PublishInfoMessage(vm.ToString(), Ice.Common.BusinessObjectMessageType.Information, Ice.Bpm.InfoMessageDisplayMode.Individual, "", "");
PublishInfoMessage(vs.ToString(), Ice.Common.BusinessObjectMessageType.Information, Ice.Bpm.InfoMessageDisplayMode.Individual, "", "");
PublishInfoMessage(vmt.ToString(), Ice.Common.BusinessObjectMessageType.Information, Ice.Bpm.InfoMessageDisplayMode.Individual, "", "");
PublishInfoMessage(pc.ToString(), Ice.Common.BusinessObjectMessageType.Information, Ice.Bpm.InfoMessageDisplayMode.Individual, "", "");

pn = "25391";

CallService<Erp.Contracts.QuoteAsmSvcContract>(qmc =>
    qmc.CheckQuoteMtlPartNum(ref qats, pn)
);

Where is the rest of the code?

I also assume you are just testing, since you have a specific guid in there.

Thank you for your reply.

Yes, I am just testing.

This is the only code that is needed to produce the error.

I get the error on CheckQuoteMtlPartNum and GetMtlPartInfo.

I do realize that I still have to do a GetMtlPartInfo and Update.

Please Help!

Thanks,

Richard

There is not enough code nor explanation enough to help you.

expand sign language GIF by Sign with Robert

Here is the trace that I am trying to duplicate in a bpm. I created the trace by going into Opportunitry/Quote Entry and changing a part number in an assembly.

<tracePacket>
  <businessObject>Erp.Proxy.BO.QuoteImpl</businessObject>
  <methodName>GetPartXRefInfo</methodName>
  <appServerUri>https://pdb-orange.pdblowers.local/Kinetic2024/</appServerUri>
  <returnType>System.Void</returnType>
  <localTime>6/22/2026 14:48:16:5975670</localTime>
  <threadID>1</threadID>
  <correlationId>e707f717-7ecd-4e1a-9b66-662241983d48</correlationId>
  <executionTime total="50" roundTrip="48" channel="0" bpm="0" bpmDataForm="0" other="2" />
  <retries>0</retries>
  <parameters>
    <parameter name="partNum" type="System.String"><![CDATA[55074]]></parameter>
    <parameter name="SysRowID" type="System.Guid"><![CDATA[00000000-0000-0000-0000-000000000000]]></parameter>
    <parameter name="rowType" type="System.String"><![CDATA[]]></parameter>
    <parameter name="uomCode" type="System.String"><![CDATA[]]></parameter>
    <parameter name="CallContext" type="Ice.Bpm.Context.ContextDataSet">
      <ContextDataSet xmlns="http://www.epicor.com/Ice/300/Bpm/Context">
        <BpmData>
          <Number01>262881</Number01>
          <SysRowID>00000000-0000-0000-0000-000000000000</SysRowID>
        </BpmData>
      </ContextDataSet>
    </parameter>
  </parameters>
  <returnValues>
    <returnParameter name="partNum" type="System.String"><![CDATA[55074]]></returnParameter>
    <returnParameter name="uomCode" type="System.String"><![CDATA[]]></returnParameter>
    <returnParameter name="serialWarning" type="System.String"><![CDATA[]]></returnParameter>
    <returnParameter name="questionString" type="System.String"><![CDATA[PART]]></returnParameter>
    <returnParameter name="multipleMatch" type="System.Boolean"><![CDATA[False]]></returnParameter>
  </returnValues>
  <serverTrace>
    <Op Utc="2026-06-22T18:48:14.8937888Z" act="Erp:BO:Quote/QuoteSvcContract/GetPartXRefInfo" correlationId="e707f717-7ecd-4e1a-9b66-662241983d48" dur="29.7176" cli="10.0.1.8:52843" usr="rz" machine="PDB-ORANGE" pid="6832" tid="125">
      <Sql queries="10" cacheHits="0" time="10.068000000000001" qryTypeCount="10" />
    </Op>
  </serverTrace>
</tracePacket>

<tracePacket>
  <businessObject>Erp.Proxy.BO.QuoteAsmImpl</businessObject>
  <methodName>CheckPrePartInfo</methodName>
  <appServerUri>https://pdb-orange.pdblowers.local/Kinetic2024/</appServerUri>
  <returnType>System.Void</returnType>
  <localTime>6/22/2026 14:48:16:6477181</localTime>
  <threadID>1</threadID>
  <correlationId>6d5be611-2e40-4336-9db6-5d219bfb51d0</correlationId>
  <executionTime total="34" roundTrip="29" channel="0" bpm="0" bpmDataForm="0" other="5" />
  <retries>0</retries>
  <parameters>
    <parameter name="partNum" type="System.String"><![CDATA[55074]]></parameter>
    <parameter name="sourceTable" type="System.String"><![CDATA[QuoteMtl]]></parameter>
    <parameter name="sourceSysRowID" type="System.Guid"><![CDATA[dffb9512-86c9-4dec-8a91-ffc4aeb72bf0]]></parameter>
                                                                 dffb9512-86c9-4dec-8a91-ffc4aeb72bf0
    <parameter name="CallContext" type="Ice.Bpm.Context.ContextDataSet">
        "",
        ref uomcode,
        out sw,
        out qs,
        out mm
      <ContextDataSet xmlns="http://www.epicor.com/Ice/300/Bpm/Context">
        <BpmData>
          <Number01>262881</Number01>
          <SysRowID>00000000-0000-0000-0000-000000000000</SysRowID>
        </BpmData>
      </ContextDataSet>
    </parameter>
  </parameters>
  <returnValues>
    <returnParameter name="partNum" type="System.String"><![CDATA[55074]]></returnParameter>
    <returnParameter name="vMessage" type="System.String"><![CDATA[]]></returnParameter>
    <returnParameter name="vSubAvail" type="System.Boolean"><![CDATA[False]]></returnParameter>
    <returnParameter name="vMsgType" type="System.String"><![CDATA[]]></returnParameter>
    <returnParameter name="productConfiguratorMessage" type="System.String"><![CDATA[]]></returnParameter>
  </returnValues>
  <serverTrace>
    <Op Utc="2026-06-22T18:48:14.9352419Z" act="Erp:BO:QuoteAsm/QuoteAsmSvcContract/CheckPrePartInfo" correlationId="6d5be611-2e40-4336-9db6-5d219bfb51d0" dur="22.6536" cli="10.0.1.8:52843" usr="rz" machine="PDB-ORANGE" pid="6832" tid="125">
      <Sql queries="11" cacheHits="0" time="15.012199999999996" qryTypeCount="11" />
    </Op>
  </serverTrace>
</tracePacket>

<tracePacket>
  <businessObject>Erp.Proxy.BO.QuoteAsmImpl</businessObject>
  <methodName>CheckQuoteMtlPartNum</methodName>
  <appServerUri>https://pdb-orange.pdblowers.local/Kinetic2024/</appServerUri>
  <returnType>System.Void</returnType>
  <localTime>6/22/2026 14:48:16:6838432</localTime>
  <threadID>1</threadID>
  <correlationId>113d4967-73a2-4d0c-84b5-bc043916ca18</correlationId>
  <executionTime total="49" roundTrip="41" channel="0" bpm="0" bpmDataForm="0" other="8" />
  <retries>0</retries>
  <parameters>
    <parameter name="ds" type="Erp.BO.QuoteAsmDataSet">
      <QuoteAsmDataSet xmlns="http://www.epicor.com/Ice/300/BO/QuoteAsm/QuoteAsm">

<tracePacket>
  <businessObject>Erp.Proxy.BO.QuoteAsmImpl</businessObject>
  <methodName>GetMtlPartInfo</methodName>
  <appServerUri>https://pdb-orange.pdblowers.local/Kinetic2024/</appServerUri>
  <returnType>System.Void</returnType>
  <localTime>6/22/2026 14:48:16:7452982</localTime>
  <threadID>1</threadID>
  <correlationId>a6f91a58-2471-4bcb-9f2a-46107a8444d6</correlationId>
  <executionTime total="66" roundTrip="59" channel="0" bpm="0" bpmDataForm="0" other="7" />
  <retries>0</retries>
  <parameters>
    <parameter name="ds" type="Erp.BO.QuoteAsmDataSet">
      <QuoteAsmDataSet xmlns="http://www.epicor.com/Ice/300/BO/QuoteAsm/QuoteAsm">

<tracePacket>
  <businessObject>Erp.Proxy.BO.QuoteAsmImpl</businessObject>
  <methodName>Update</methodName>
  <appServerUri>https://pdb-orange.pdblowers.local/Kinetic2024/</appServerUri>
  <returnType>System.Void</returnType>
  <localTime>6/22/2026 14:48:51:3576149</localTime>
  <threadID>1</threadID>
  <correlationId>df1f43d2-8443-4da2-856d-b34d68b558e2</correlationId>
  <executionTime total="247" roundTrip="239" channel="0" bpm="0" bpmDataForm="0" other="8" />
  <retries>0</retries>
  <parameters>
    <parameter name="ds" type="Erp.BO.QuoteAsmDataSet">
      <QuoteAsmDataSet xmlns="http://www.epicor.com/Ice/300/BO/QuoteAsm/QuoteAsm">

Here is all of the code in test mode.

this.CallService<Erp.Contracts.QuoteSvcContract>(qmc =>
        qmc.GetPartXRefInfo(
        **ref** pn,
        System.Guid.Parse("00000000-0000-0000-0000-000000000000"),
        "",
        **ref** uomcode,
        **out** sw,
        **out** qs,
        **out** mm
));
this.PublishInfoMessage(sw.ToString(),Ice.Common.BusinessObjectMessageType.Information, Ice.Bpm.InfoMessageDisplayMode.Individual,"","");
this.PublishInfoMessage(qs.ToString(),Ice.Common.BusinessObjectMessageType.Information, Ice.Bpm.InfoMessageDisplayMode.Individual,"","");
this.PublishInfoMessage(mm.ToString(),Ice.Common.BusinessObjectMessageType.Information, Ice.Bpm.InfoMessageDisplayMode.Individual,"","");

st = "QuoteMtl";
sourceSysRowID = System.Guid.Parse("DFFB9512-86C9-4DEC-8A91-FFC4AEB72BF0");
this.CallService<Erp.Contracts.QuoteAsmSvcContract>(qmc =>
        qmc.CheckPrePartInfo(
        **ref** pn,
        st,
        sourceSysRowID,
        **out** vm,
        **out** vs,
        **out** vmt,
        **out** pc
));
this.PublishInfoMessage(vm.ToString(),Ice.Common.BusinessObjectMessageType.Information, Ice.Bpm.InfoMessageDisplayMode.Individual,"","");
this.PublishInfoMessage(vs.ToString(),Ice.Common.BusinessObjectMessageType.Information, Ice.Bpm.InfoMessageDisplayMode.Individual,"","");
this.PublishInfoMessage(vmt.ToString(),Ice.Common.BusinessObjectMessageType.Information, Ice.Bpm.InfoMessageDisplayMode.Individual,"","");
this.PublishInfoMessage(pc.ToString(),Ice.Common.BusinessObjectMessageType.Information, Ice.Bpm.InfoMessageDisplayMode.Individual,"","");

pn = "25391";
this.CallService<Erp.Contracts.QuoteAsmSvcContract>(qmc =>
        qmc.CheckQuoteMtlPartNum(
        **ref** qats,
        pn
));

pn = "PartNum";
this.CallService<Erp.Contracts.QuoteAsmSvcContract>(qmc =>
        qmc.GetMtlPartInfo(
        **ref** qats,
        pn
));

this.CallService<Erp.Contracts.QuoteAsmSvcContract>(qmc =>
        qmc.Update(
        **ref** qats
));

Here is the big picture.

I will add a “change part number” button to the Manufacturing/Materials form and a text box with a new part number.

They will be on a material part number form that they want to dhange the part number on and then key in a new part number and then click the change part number number.

My bpm with look through all of the QuoteMtl records on the quote and if the record has the same part number as the part number on the form then it will change it to the new part number.

My customer wanted to be able to mass change certain part numbers on the quote which may have thousands of parts without having to do it manually one part at a time.

It’s pretty quick to do this already if you use the grids

  1. Copy all lines:

  1. “Export selected to excel” (if you use copy selected, when you paste back into excel the data type may drop important information - we had leading 0s in our part numbers which vanish)

  1. Change the part numbers in all cells you want to change
  2. Delete the existing rows

  1. Highlight the rows you want to add back, and don’t include the column headers

  1. Paste new

That’s a key step