Erp.Bpm.TempTables.MtlQueueTempRow
usable in in trans & std
Erp.Bpm.TempTables.MtlQueueTempRow
usable in in trans & std
ok. heres what we have.
if( callContextBpmData.Character01.EndsWith(â|â) )
{
callContextBpmData.Character01 = callContextBpmData.Character01.Remove(callContextBpmData.Character01.Length - 1);
}
List rowsList = callContextBpmData.Character01.Split(â|â).ToList();
callContextBpmData.Character01 = ââ;
foreach(var rowStringJson in rowsList)
{
MtlQueueTempRow myRow = JsonConvert.DeserializeObject(rowStringJson);
}
I imagine this is what you mean by knowing how to deserialize it properly?
I got you a skeleton, hold one.
In-Trans
//using Newtonsoft.Json;
//This is probably all you need to do in-trans, unless you need to add conditions
//Of course, if you do need conditions, you could filter later in the standard too
callContextBpmData.Character01 += JsonConvert.SerializeObject(ttMtlQueue.First()) + "|";
Standard
//using Newtonsoft.Json;
callContextBpmData.Character01.TrimEnd('|');
List<string> rowsList = callContextBpmData.Character01.Split("|").ToList();
callContextBpmData.Character01 = "";
foreach(string rowJson in rowsList)
{
Erp.Bpm.TempTables.MtlQueueTempRow rowToProcess = JsonConvert.DeserializeObject<Erp.Bpm.TempTables.MtlQueueTempRow>(rowJson);
//Now you can do work with the row...
var jobNum = rowToProcess.JobNum; //etc
//Do whatever work you wanted to do before...
}
@klincecum
I have this working.
It is now posting to the API should the record end up making it to the standard Directive update!
I have some other issues but this is for the guys who programmed the function i am hooking onto.
Thank you for this.
I lost some brain cells, so Iâll have a few beers and celebrate by losing some more.
Hi, Iâm still having issues with sporadic material queue records.
I have the following row but the Standard directive does not fire after the in transaction runs, this is an output from the in-transaction.
The whole bpm works with every majority of records.
callContextBpmData.Character01 {âRowModâ:âAâ,âCompanyâ:âLIFTâ,âSysDateâ:â2023-03-09T00:00:00â,âSysTimeâ:49973,âMtlQueueSeqâ:90918,âPlantâ:âMfgSysâ,âPartNumâ:â00000â,âQuantityâ:25.00000000,âTranTypeâ:âSTK-SHPâ,âReferencePrefixâ:âSO:â,âReferenceâ:â918301/6/1â,âRequestedByEmpIDâ:ââ,âSelectedByEmpIDâ:ââ,âJobNumâ:ââ,âAssemblySeqâ:0,âJobSeqTypeâ:âMâ,âJobSeqâ:0,âFromWhseâ:âNDCâ,âFromBinNumâ:âCAR01â,âToWhseâ:âSHIPâ,âToBinNumâ:âSHIPâ,âNextAssemblySeqâ:0,âNextJobSeqâ:0,âNeedByDateâ:â2023-02-23T00:00:00â,âNeedByTimeâ:49973,âVendorNumâ:0,âPurPointâ:ââ,âPackSlipâ:ââ,âPackLineâ:0,âOrderNumâ:918301,âOrderLineâ:6,âOrderRelNumâ:1,âTargetJobNumâ:ââ,âTargetAssemblySeqâ:0,âTargetMtlSeqâ:0,âRevisionNumâ:ââ,âPartDescriptionâ:â7W Firestay LED CCT Downlight - Dim, P&P, 3 Colour, 40°â,âIUMâ:âEAâ,âPONumâ:0,âPOLineâ:0,âPORelNumâ:0,âVisibleâ:true,âRMANumâ:0,âRMALineâ:0,âRMAReceiptâ:0,âRMADispâ:0,âNCTranIDâ:0,âLotNumâ:ââ,âLockâ:false,âQueueIDâ:ââ,âQueuePickSeqâ:0,âReleaseForPickingSeqâ:13288,âWhseGroupCodeâ:ââ,âTranStatusâ:âRELEASEDâ,âWaveNumâ:0,âPriorityâ:3,âTranSourceâ:ââ,âLastMgrChangeEmpIDâ:â2177â,âAssignedToEmpIDâ:ââ,âTargetTFOrdNumâ:ââ,âTargetTFOrdLineâ:0,âPackStationâ:ââ,âDistributionTypeâ:âHANDHELDâ,âObs10_PkgNumâ:0,âObs10_PkgLineâ:0,âSysRevIDâ:âAAAAAAiuIno=â,âSysRowIDâ:â2750a609-6f33-4c07-9191-0df9fc7ef1a9â,âPCIDâ:âUSE-FROMPCID-TOPCIDâ,âEpicorFSAâ:false,âLastUsedPCIDâ:ââ,âFromPCIDâ:ââ,âToPCIDâ:ââ,âAttributeSetIDâ:0,âAttributeValueSeqâ:0,âNumberOfPiecesâ:0,âUD_SysRevIDâ:âAAAAAAiuIns=â,âWhseSplit_câ:ââ,âWhseSplitNum_câ:0,âEntityKeyâ:null}|
Are you positive itâs not firing, or some other failure?
100%.
On the Standard Directive I only have a code block which posts a string to the event logs so i know if it its triggered and it doesnât for some records.
I also have the same post to event viewer with a different string just before the Enable Standard Directive widget. which writes everytime.
Next question, are you sure that record was written to the DB ?
As in, it succeeded.
yes, it exists in the Material Queue ready for processing.
Itâs possible the call context wonât work for this, or weâve overlooked something.
I have a few other options, I will think on it.
thank you.
I have another possible solution around this.
Create a CSV file of all records (based on FromBinNum = x or y) in the Material Queue (using a function on a schedule)
This would have to be date and time dependent as records will arrive in the material queue in batches.
I am unsure how big of a task this is and exactly how to do this.
sorry for the spam but i could create a BAQ export as CSV and run that on a schedule.
the only problem with this is each export has to have the same file name.
No problem dude, I got an idea, just got to finish forming it.
sweet, thanks.
Before I help him with a workaround, is there anybody who knows why
a standard directive wouldnât fire even though the in-trans did, and was successful?
This definitely solved the problem.
My issue was i had another Epicor function running that stops the Standard Directive firing for some unknown reason.
Workaround was simple and works a treat
Thank you.