Is the InventoryQtyAdjAdapter designed to plunge you into madness?
Or a more helpful question - has anyone successfully used this adapter?
I am boinking my way thru and it’s a damn mess. If I explicitly create a row in InventoryQtyAdjData - ala adj.InventoryQtyAdjData.InventoryQtyAdj.AddInventoryQtyAdjRow() then I get the error:
Cannot insert duplicate key row in object ‘Erp.PartFIFOCost’ with unique index ‘IX_PartFIFOCost’. The duplicate key value is (CP, X002, , 1, 2017-09-08, 1, 0).
The statement has been terminated.
Hmmm, I wasn’t aware I was inserting that row…
Otherwise creating my own copies of the datasets I get this error:
ttInventoryQtyAdj record not found.
You have to create a new ttInventoryQtyAdj, if I remember. I have some sample code somewhere. I think its in the office but if you can, create that tt and add it, then you should be ok. i think it changed at a certain patch, maybe 10.1.400.7.
Sure – will do. It’s a bpm basically. You can type it as a var which is kinda’ lazy, or define your ttDataSet.DataTable.Row type which can be put in a try catch and initialised to null.
@Chris Found it! I was trying to read the bpm file by unzipping it! I would be lost without my years of gathering sample code…. I have recently been thinking about releasing an api of helpers for standard customisation tasks module by module…anyway as attached. Hope it helps.
InventoryQtyAdjTableset JobAsmblDS = new InventoryQtyAdjTableset ();
var tt = new SelectedJobAsmblRow();
if(tt == null)
throw new Ice.BLException("Error: Record Not Found; InventoryQtyAdjTableset ");
No worries. As I said it was problematic even in bl tester due to the failure to create that record but the good thing about the framework nowadays is you can do a lot of reflection.
I put your code into my customization with custom assemblies:
Erp.Adapters.InventoryQtyAdj
Erp.Contracts.BO.InventoryQtyAdj
and I get the errors below.
I know it is something simple, but please help!
Thanks,
Richard
430 InventoryQtyAdjDataSet iqadj = adj.GetInventoryQtyAdj(PartNum,""); //??ea?
431 InventoryQtyAdjBrwDataSet ibrw = adj.GetInventoryQtyAdjBrw(PartNum, WH, out primaryBin); //used to get mainly bin info?
Compiling Custom Code …
----------errors and warnings------------
Error: CS0246 - line 430 (938) - The type or namespace name ‘InventoryQtyAdjDataSet’ could not be found (are you missing a using directive or an assembly reference?)
Error: CS0246 - line 431 (939) - The type or namespace name ‘InventoryQtyAdjBrwDataSet’ could not be found (are you missing a using directive or an assembly reference?)