• Button script to change invoice date for a whole batch... error 84

    A customer has asked for an easy way to change the invoice date for an entire batch (without using VI). What I am trying is a button script run from SO Invoice Entry, opening a new object, grabbing the ModuleDate, scrolling through the batch and setting…
  • I can't seem to set an event for an item change

    I am trying to get an event trigger when an item quantity changes so I can perform a real time update in a UI. I have tried setting Post Write Events on IM_ItemWarehouse and IM_ItemTransactionHistory, but although I can see the DB Tables changing/updating…
  • Receipt of Invoice adding lines using BOI with multiple POs

    Hello, I have two PO's and one line detail for each. I'm trying to add two lines to the Receipt of Invoice screen using BOI, using Sage 100 v2020 multiple POs. This is a new functionality with their cloud license. I get the header by setting Purchase…
  • Prepaid Invoice Requests

    Our developers have written an interface to pull and push AR customer data. Invoices (IN) are not a problem, but prepaid invoices (PP) produce no results and no errors. I'm pasting the code below. Any ideas? using System; using System.Collections.Generic;…
  • Script to check SalesOrder Detail & Update Salesorder Header

    Hello, I am using sage 2018 & am trying to create a script that works alongside scanforce. We received the oSalesOrder.nMBAutoAllocateSalesOrder() command from Scanforce to allocate orders with a VBS, but we're on our own in terms of creating the rest…
  • Purchase History Button Purchase Order Entry

    Hi Guys I am trying to get a window to display on purchase order entry which will shows everything we purchased from the vendor in the past. On sales order you have the binoculars to do this but all you have on Purchase Order is Alias Item Lookup…
  • IM_ItemCost

    I'm trying to find the last unit cost for a warehouse in Sales Order entry. Sage defaults to the last unit cost for all warehouses. I'm getting a not found from this code. I don't know the GROUPSORT. If oSession.CompanyCode = "TST" Then retval = oSession…
  • GetResultSets Filter Not Equal To

    How can I use the GetResultSets method in BOI to return a data set that does not match a certain criteria. Below is my sample code that is trying to find all Sales Orders where the CurrentInvoiceNo is not empty. However, this does not return any results…
  • Button to run AP Aging from Vendor

    I created a button on the Vendor Maintenance screen that runs the AP Aging report. I pass in the AP Division and Vendor numbers, but I can't get the report to filter by those values. (Want to run the Aging for the Vendor displayed, like the Sage button…
  • Error 538 in Method Movenext

    Hi All, Getting this funky error in method movenext. This script runs through SOs and deletes the ones in a particular range for a particular customer. This is the snippet in question. Any idea what I might have goofed? it seems to work sometimes…
  • GetResultSets unexpected result sets

    I have 2 sets of GetResultSets that produce different results. Could some please explain to me why these 2 examples of GetResultSet methods return different result sets? I've read some examples, including Advanced GetResultSets() by a Sage developoer…
  • Detect what event a BOI script is triggered by?

    I ran into a scenario where I need to do things different from a Pre-Totals event, vs Column Post Validate events, all within the same script. Easily enough, there is the "column" variable passed into an event script, which will be blank for the Pre-Totals…
  • Access IM_ProductLine data from an SO detail script

    A little birdie whispered a shortcut in my ear once, but it isn't working consistently for me today. (v2018.2, Standard). retVal = oBusObj.GetValue("ProdLine.ProductLineDesc$", sPLDesc) I was able to get results, intermittently, but sometimes they…
  • WHAT IS THE RETURNED VALUE -1 MEANS

    Hi Forum, I am trying to update the BOM lines with the alternate key "kWHEREUSED" and when i am writing the record i am getting a retVal = -1... What is the value -1 means... below is the code that i am using. retVal = oBomItem.oLines.nWrite(…
  • <Error: 0 in Method WRITE>

    Hi Forum, I am getting an <Error: 0 in Method WRITE> message when trying to update a component in Bill Detail table. I've tried setting key values, SetKey(), Setkey(bmComponentkey)... with no luck. Any suggestions?... here is the script scrapPercentage…
  • External script to run Sage 100 program?

    Need assistance with external script to run a Sage 100 program. Version 4.5. The program is usually run thru SYZCON. Wanted to create a script to run the program and schedule thru knowledgesync.
  • Window element does not exist or already exists in a button script

    Tearing my hair out on this one. My goal is to look through detail purchase order detail lines looking for specific inventory items. This is a button script on the Inventory Item Maintenance Screen. Sage 100 2018 Advanced (script is set to run on…
  • SQL Query for Vendor and Customer Account Balances

    We are in the process of upgrading to Sage 100 Premium. Can anyone help me re-write these SQL Queries from our old version of MAS200? The table names and fields have changed and some of the fields are no longer in the master tables. Any help is appreciated…
  • Adding Line to SO Entry with qty ordered being the total of extension amount of other items

    Hello, I am fairly new to scripting and have only written some simple ones before this. I am trying to add one line to the SO Detail with the Qty Ordered = the total Extension Amount of Inventory type items. I am running this as a Table - Pre Totals…
  • Adding a "Detail" table level field to a report selection grid

    So in the past, I have been able to dynamically add fields to a report selection grid as long as the field was on the "header" or "main" table for the report. Now i'm trying to add a field from the detail table to the grid. I can add the field and everything…
  • Need to display qualifying records in a grid fashion

    HI We have a button on customer maint. screen which when clicked opens up Sales Order/Quote History program. User can select customer from F2 list. Instead, we would like to pass current customer number to this program so only records where customer…
  • Script Problem - Trying to assign a date

    Trying to create a script that would read the ShipVia field and if it says "OCEAN" then it is to take the value of the Ship date and add 25 and write the date in a UDF. Get an error message. Here is the script. sDate="" Ship="" retVal=oHeaderObj.GetValue…
  • Script to parse item description

    hi... trying to create a script that will read a portion of the sales order item description and pull that data into another field. I can pull the entire description in another field with the script, but my problem is I need to parse part of the description…
  • Use of vbscript input box function with mas 200

    I'm doing a button script to prompt for a value and then execute some code. Trying to avoid creating a udf to hold the parameter that will just be discarded after the code is run. Succeeded in mas 90 using the following: Retval = inputbox("enter value…
  • Can anyone see an obvious mistake in this script or did I find a bug?

    The ultimate goal of this is while in sales order entry (or invoice entry) to get the sales g/l account and the cost of goods sold g/l account and modify it I'm having no problem with the sales account (so I left that part of the code out), but when…