Sage 100

 View Only
  • 1.  Bill Import of Components Without Having LineKey That Already Exists When Not Allowing Duplicate Components

    Posted 08-22-2019 10:29
    Has anyone found a simple way to modify an existing component in BM_BillDetail when using VI to import without the LineKey?
    My first attempt to do so when the "Allow Duplicate Components" option is disabled results in the record failing with a error msg saying "the component already exists. Do you want to modify it?".
    I have not found simple way to somehow tell the import to modify the existing component.
    Am I missing something?

    ------------------------------
    David Speck II
    Tennessee Software Solutions
    ------------------------------


  • 2.  RE: Bill Import of Components Without Having LineKey That Already Exists When Not Allowing Duplicate Components

    Posted 08-22-2019 10:34
    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
    ------------------------------



  • 3.  RE: Bill Import of Components Without Having LineKey That Already Exists When Not Allowing Duplicate Components

    Posted 08-22-2019 10:55
    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
    ------------------------------