• Date Customer Last Purchased

    Hi Guys I am looking for a field within sage that gives a date that the customer last made a purchase. The only date I found which was similar was LastActivityDate but this can be triggered by lots of different things. Do you guys know if this exists…
  • Getting User Code

    I am trying to change the user code on orders importing through ROI's Insynch based on the customer no. To get the user code do you use "oSession" I wouldn't think so because the actual user is not actually in the session right? And I shouldn't use "oBusObj…
  • PurchaseOrder Detail - set UnitOfMeasure default - correct event?

    Our PO team wants Purchase Order lines to have the UnitOfMeasure to populate as EACH. I put in the most basic script I could think of; retVal = oBusObj.SetValue("UnitOfMeasure$","EACH") but I cannot seem to find the correct event to use. I was able…
  • Script to copy a header field to all detail fields

    I am trying to copy a header field (PO_PurchaseOrderHeader - UDF_REQ_SHIP_DATE) to a field in (PO_PurchaseOrderDetail - UDF_HEADERSHIPDATE) I tried the following script: retVal = 0 headershipdate = "" retVal = GetValue("UDF_REQ_SHIP_DATE$",headershipdate…
  • QTY Pulled Calculation

    I am giving my best attempt at scripting a calculation of what we have on hand compared to the original ordered quantity and populating a UDF. I know I have some holes as to the logic of the process and my end goal but I think I can figure those out if…
  • Script to only fire off Once

    Before I start to write this script, is there a way to only allow a script to fire off once? Background of the script I will create: Need to populate the "SO DETAILS PURCHASEORDERNO" if blank with a "C" for all customers except 3 or 4, and only on lines…
  • Script to find the Contact Code from the Confirm To in Sales Order

    Hi, I'm trying to write a script to find the Contact Code using the Confirm To in the Sales Order header so that I can populate some user defined fields in the contact code maintenance into the sales order header. I have this so far, but it's not finding…
  • Type mismatch

    Hello, I'm trying to convert numbers entered into a text field to an integer value. I have tried: number(textfield) CInt(textfield) but nothing seems to work. Any ideas? Thanks, Kevin
  • Date Script Check

    I used a few other post to compile this script to add 7 days to the order date and populate a UDF date field. I tested the script and it worked but I get nervous about how I am getting the results, is it best method wise? Could someone please check it…
  • Add 7 or 14 to a date to populate a UDF

    Hi Forum, I am trying to populate a date in UDF based on a date in UDT plust 7 or 14 days depending on the Whse code. i've tried what i know and what i got from the forum and i am still getting an error on the following message. here is…
  • UDF Calculation

    Hello I want to calculate UDF H, W & D to Volumn Field to get the cubic feet of item: (H x W x D)/1728. The following formula doesn't work on a prewrite UD script setting. I appreciate help from you expert. Thanks :) H = 0 W = 0 D = 0 CF = 0 retVal…
  • Search Address Fields Script

    Trying to search the 3 address line fields for a key word to populate the ShipToCode and the ShipVia field. Can I do this in one script or do I have to create a script for each search field? This is what I got so far. rVal = 0 sAddress = "" sAddressa…
  • Storing Value of Field Before Change in Audit Table

    Hello, I am attempting to create an audit table that will show the value of the filed before and after a change, but I can't seem to find anything online that shows how to do that. Would I need to run one pre-write script to capture the value first…
  • User Defined Scripts to populate a UDF

    I'm creating a script to auto-populate an SO_Detail UDF (UDF_SHIP_REF1) so that I can pass data to StarShip. The goal is to concatenate the item number with the Customer PO Number (i.e. "3131000 / 123456789" ) I have developed a more detailed script…
  • How can I add a field to the SY_Country table?

    We are being forced to integrate with two other systems that don't allow 3 character country codes. Therefore, I have been forced to add 2 char country codes to our country table. Using the alt-country code field was not an option for these integrations…
  • Purging Records from UDT used as Lookup Table on Sales Order Entry

    I have developed a UDT and using as a lookup table for UDF in Sales Order Entry. Prior to updating the table with new look up values my script is: Do until oUDT.Eof = 1 retVal = oUDT.GetValue("UDF_SHIP_VIA$",Via) if Via <> "" then Counter = Counter…
  • UDF Field Not always showing for reporting

    I have added a UDF to our Sage 100 SO_SalesOrderHeader table. I added it to the screen and set it up to print on the packing slip (uses the same table). When I try to add it to a report (which again has the same table) its not on the list to select from…
  • Can't find the created UDT as a Data Source while adding a field to the AR Customer table

    Hello, I created an SY UDT, and then I tried to add the field from this UDT into the AR_Customer table. I don't see the UDF from that SY UDT as a Data Source under the AR_Customer_Bus. Is there one more step to link them before I'm able to select the…
  • Sage 100 Scripting - Find SO_SalesOrder_Bus obj from the SO_SalesOrderDetail_Bus

    I am trying to create a script for when the Item Code changes in Sales Order Entry. I have looked all over and I have seen posts that this is not available but I thought I would check since the posts I found were a few years old. What I am trying…
  • Zero Pad/Fill a UDF

    Want to create a UDF and have it zero padded so if the user enters 1 it becomes 001, if they enter 10 then it becomes 010. If that possible? I have the format as ###0 but nothing I just get 1 or 2 or 10
  • EoF and Loop not working

    I have multiple scripts that use EofF and Loop routines. The scripts work correctly on my laptop and other computers. For one customer running Sage 100 2020.2 on the Windows 2019 server they are not running. I am at a loss.
  • User Defined Script - Problems Getting Child Handle

    I'm trying to accumulate the quantities of all the detail lines in an AR invoice, but only if the item is of a certain type. I defined a UDF for that checkbox, and put it in the Item Maintenance screen. I would like the total to update whenever a user…
  • Alternate method to determine tables in a wrkTable

    So we're giving rights to a user who will be doing lots of reporting. We currently have the SOP to determine the tables that are used in a wrkTable, using UDT Maintenance. We're looking to identify an alternate method to let this user view the tables…
  • How to use RoundUp in UDF Scripts for Sage 100

    Hi Everyone, I created the following Script and there are no errors. I am trying to figure out how many packages are needed by dividing the Quantity Shipped / Pack Qty. The issue is I do not know how to ROUNDUP in the Sage 100 Scripts. Example #1…
  • Column PostValidate

    I have a column postvalidate script called when a user selects a udf field using a UDT for validation. Essentially the script gets the returned value from the UDF lookup, then opens the UDT and gets another value out of the table. Table columns…