Well see, that isn't as simple as I was hoping for, I was hoping there was a variable or something that could be set either before setting the item code to tell the _Bus object to modify the existing record but i haven't found it yet.
My current approach use the following code in the "After Read" perform logic to look up the item code using the ItemCollection method to retrieve the line key and then set it into a source column at the end of my actual source columns in the source file. I then added the LineKey field before the ItemCode but with a conditional expression evaluating the source column used to hold the LineKey and checking that it is not blank.
L.LineKey$=""; IF IMP$[12]="L" AND IMP$[10]<>"" THEN {coBusiness'Lines'ItemCodeCollectionFind(IMP$[10],L.LineKey$)}; IMP$[18]=L.LineKey$ ! '------------------------------
David Speck II
Tennessee Software Solutions
------------------------------
Original Message:
Sent: 08-22-2019 10:33
From: Kevin Moyes
Subject: Bill Import of Components Without Having LineKey That Already Exists When Not Allowing Duplicate Components
I have not tried this but perhaps a Pre-Validate script on ComponentItemCode, to look it up in the Bill (using a new object)... if found, set your LineKey to match...?
------------------------------
Kevin Moyes
Technical Systems Analyst
Munjal White Consulting Co.
Toronto ON
------------------------------