Hello All,
I’ve run into a head scratcher and would love a fresh set of eyes.
I have a UD Field ProductionGroup_c in JobAsmbl.
Since the assemblies tab in job entry is read only for ASM 0, I have an EpiDataView created for JobAsmbl where AsmSequence = 0, this dataview is then bound to combo boxes on the job tab.
I can successfully save the Production group to ASM 0 and see that it has written to the DB via BAQ.
When I click Engineer and save, the ProductionGroup_c field is returned in the result data set as null.
Custom code:
public void InitializeCustomCode()
{
// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Initialization' lines **
// Begin Wizard Added Variable Initialization
// End Wizard Added Variable Initialization
// Begin Wizard Added Custom Method Calls
// End Wizard Added Custom Method Calls
CreateASM0View();
//SetExtendedProperties<bool>("CurrAsm", "ProductionGroup_c", "ReadOnly", false);
//SetExtendedProperties<bool>("CurrAsm", "LotAssignmentType_c", "ReadOnly", false);
}
private void CreateASM0View()
{
edv_ASM0 = new EpiDataView();
edv_ASM0.dataView = ((EpiDataView)(this.oTrans.EpiDataViews["JobAsmbl"])).dataView.Table.DefaultView;
edv_ASM0.StaticFilter = "AssemblySeq = 0";
oTrans.Add("ASM0",edv_ASM0);
}
I am having trouble identifying why the return dataset would have null for ProductionGroup_c.
Trace Log:
<tracePacket>
<businessObject>Erp.Proxy.BO.JobEntryImpl</businessObject>
<methodName>Update</methodName>
<appServerUri>here be dragons</appServerUri>
<returnType>System.Void</returnType>
<localTime>11/5/2019 13:32:27:6179708 PM</localTime>
<threadID>1</threadID>
<correlationId>24d1ef93-c8fe-4aa7-878d-f800830a0739</correlationId>
<executionTime total="3105" roundTrip="702" channel="0" bpm="2368" other="35" />
<retries>0</retries>
<parameters>
<parameter name="ds" type="Erp.BO.JobEntryDataSet">
<JobEntryDataSet xmlns="http://www.epicor.com/Ice/300/BO/JobEntry/JobEntry">
<JobHead>
<!-- Removed for Clarity-->
</JobHead>
<JobAsmbl>
<!-- Removed for Clarity-->
<AssemblySeq>0</AssemblySeq>
<!-- Removed for Clarity-->
<RowMod></RowMod>
<ProductionGroup_c>2</ProductionGroup_c>
<UD_SysRevID>AAAAAARbJW0=</UD_SysRevID>
</JobAsmbl>
<JobPart>
<!-- Removed for Clarity-->
</JobPart>
</JobEntryDataSet>
</parameter>
</parameters>
<returnValues>
<returnParameter name="ds" type="Erp.Tablesets.JobEntryTableset">
<JobEntryDataSet xmlns="http://www.epicor.com/Ice/300/BO/JobEntry/JobEntry">
<JobHead>
<!-- Removed for Clarity-->
</JobHead>
<JobAsmbl>
<!-- Removed for Clarity-->
<AssemblySeq>0</AssemblySeq>
<!-- Removed for Clarity-->
<RowMod></RowMod>
<ProductionGroup_c></ProductionGroup_c>
<UD_SysRevID>AAAAAARbJXQ=</UD_SysRevID>
</JobAsmbl>
<JobPart>
<!-- Removed for Clarity-->
</JobPart>
</JobEntryDataSet>
</returnParameter>
</returnValues>
<paramDataSetChanges>
<paramDataSet name="ds" useDataSetNbr="0">
<changedValue tableName="JobHead" rowState="Modified" rowNum="0" colName="JobEngineered"><![CDATA[True]]></changedValue>
<changedValue tableName="JobHead" rowState="Modified" rowNum="0" colName="EnableJobFirm"><![CDATA[False]]></changedValue>
<changedValue tableName="JobHead" rowState="Modified" rowNum="0" colName="EngineerAllowed"><![CDATA[False]]></changedValue>
<changedValue tableName="JobHead" rowState="Modified" rowNum="0" colName="HeaderSensitive"><![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>
<serverTrace>
<Op Utc="2019-11-05T18:32:27.7062284Z" act="Erp:BO:JobEntry/JobEntrySvcContract/Update" correlationId="24d1ef93-c8fe-4aa7-878d-f800830a0739" dur="594.1822" cli="65.78.61.194:65343" usr="dlindner_admin" machine="ausdtsapptst01" pid="14068" tid="21" xmlns="">
<Sql queries="211" cacheHits="77" time="345.1722" qryTypeCount="132" />
<BpmCustomization Source="DB" BpMethodCode="Erp.JobAsmbl" Type="In Transaction Trigger" Duration="0">
<BpmDirective Type="0" ID="abf49c80-b798-42f3-9a3a-fbdb53b6a26e" Name="test" VisibilityScope="0" Duration="0" />
</BpmCustomization>
</Op>
</serverTrace>
</tracePacket>
The trace log is showing that I am sending ProductionGroup_c to the server. but the return dataset is showing the ProductionGroup_c as null.
The BPM customization was a debug message to see what was happening in transaction.
<BpmCustomization Source="DB" BpMethodCode="Erp.JobAsmbl" Type="In Transaction Trigger" Duration="0">
This showed me that between the customization and the in-transaction BPM something was setting the ProductionGroup_c as Updated to null.
Any Ideas as to why this information is being updated to null?
Also, I has originally tried just using the CurAsm DataView on the Assemblies tab, but immediately abandoned that path to go the rout of added complexity. I may still look into trying to make the combo boxes on that tab ReadOnly = False.
Edits:
11.05.19:
Changed instances of ProdGroup_c to the UD fields real name ProductionGroup_c
11.06.19:
Some method is setting Asm 0 values to match JobHead.
I added a control to modify the description of ASM0 independently of JobHead Description; When I saved, Job Asm 0 Description was overwritten by the JobHead description. It looks as if somewhere in the Update method, JobHead Maps changes to Asm 0. I don’t see any Column maps that would allow for mapping of UD fields from JobHead -> Assembly, so I might just have to introduce an In-Transaction to stop the overwrite of UD fields on Asm 0.
The answer seems to be that when engineering a job, the UD mapping is run and the Asm 0 is being overwritten (in my case) by information from PartRev.