Sage 100

 View Only
  • 1.  **v2014.5 Add line item to every imported sales o

    Posted 06-26-2018 07:48
    **v2014.5 Add line item to every imported sales order** Aside from Scripting / Perform Logic, is there a way within VI to have a specific line item added to every imported sales order (i.e. item #047, qty 1, $5.00)?


  • 2.  RE: **v2014.5 Add line item to every imported sales o

    Posted 06-26-2018 08:08
    Could you chain to another import?


  • 3.  RE: **v2014.5 Add line item to every imported sales o

    Posted 06-26-2018 08:11
    Right, forgot to mention that. In this case I don't believe so since the sales order #'s are not in the Excel source file; using 'Next' inside VI.


  • 4.  RE: **v2014.5 Add line item to every imported sales o

    Posted 06-26-2018 08:37
    Not that I'm aware of unless you can use SQL to query the source file and write the SQL statement so that VI will see a record with the info for the line you want to write. Although a header pre-write perform logic should do this quite easily. Should be something along the following. Of course you could adapt this to a vbscript but you would probably want to make sure the oSession.StartProgram property starts with ""VI"". ``` coBusiness'Lines'AddLine() coBusiness'Lines'SetValue(""ItemCode$"",""#047"") coBusiness'Lines'SetValue(""QuantityOrdered"",1) coBusiness'Lines'SetValue(""UnitPrice"",5) coBusiness'Lines'Write() ```


  • 5.  RE: **v2014.5 Add line item to every imported sales o

    Posted 06-26-2018 10:35
    Brett there may be a way. Is the box for _Header Separate from Line Record_ checked?


  • 6.  RE: **v2014.5 Add line item to every imported sales o

    Posted 06-26-2018 12:27
    No, not checked, @AlnoorCassim.


  • 7.  RE: **v2014.5 Add line item to every imported sales o

    Posted 06-26-2018 13:53
      |   view attached
    Since w/o a Perform we can't tell if we're on the last line of the order, I was trying to add your item as the 1st line since we can tell if no items have been added yet. Long story short, because of the way V/I processes sequentially line by line instead of consuming all the order data then processing, this is only really possible by inserting the extra itemcode line in the import file itself (but that in itself requires a Perform). In short, to solve your problem, despite your condition, just like on other SC threads where I've posted straightforward Performs that's been put in use (like how to prevent duplicate A/P invoices), think of this as the same. Just click on the Perform button on Config tab in Import Job Maint and set it up like you see in this screenshot. Then create the TXT file in the right folder, copy David's code in there but add an EXIT or RETURN as the last line. That's it.