• How to Flow a UDF from Sales Order Header to SO History Header Reliably

    With identical UDF names in both tables, the original value set into the SO Header UDF via a ColumnPostValidate script from a standard field works to flow the value to SO History Header, but subsequent successful updates directly to that SO Header UDF…
  • Copy UDF Values from AR_CUSTOMER.M4T to Equivalent UDFs on new Sales Orders

    New to this forum, and new to using the Business Object Interface. Scenerio: I'm on Sage 100 2022 Standard, and am about to implement Sage Alerts & Workflow. One of the tasks I will be creating will periodically look at all open Sales Orders and automatically…
  • 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
  • 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…
  • Write on Production table using script

    Are we able to write on the Production table from the Sales Order Entry UI? I have items that based on the S/O Entry need to be put on a Production Entry so was wondering if after they are entered in the SO and the Picking Sheet is printed, I can write…
  • Script not working correctly.

    I have a script that is suppose to look at the date of last activity of a customer when a sales order is being written and if there is no activity for the last 720 days a message box is to pop up and let the salesperson know they are suppose to ask for…
  • Update the new UDF field for the existing Payment Header records with the CC last 4 digits

    Hi, We are working on a requirement, where we have to update the UDF field for the existing Credit Card Payment records with the last 4 digits of CC before the user clears off the CC details. I am trying to code the same in the VBScript, the Post Validate…
  • Script to Generate Material Requisition

    I am having issues setting the Purchase Order lines with a GL Account code or key gathered from a SQL table. It doesn't matter what I try to pass, the system always defaults it to some obscure account code. All other fields I set work except for the GL…
  • BOI During Daily Sales Reports & Updates

    I have a simple script that updates a UDF in AR_Customer. The script is a Table Pre-Write event on AR_Customer. It works perfectly when editing a customer record in Customer Maintenance. It does not work though when the Daily Sales Reports & Updates are…
  • Unable to get previous Sales Order Lines on table - Pre Write?

    Hello, I'm simply wanting to write the previous item code to a UDT when the line is changed in a sales order. For example, if the item code was abc123 and a user changed it to def456, I want to write abc123 to the UDT. However, each time I try to access…
  • Multiple table writes requires multiple Objects? (Audit Script)

    Hello, I am in the process of building a "Change Tracking" system for Sales orders which tracks any changes to a specified list of fields. To do this, on a Table Pre-Write script I simply gather the information from the So History record and compare…
  • Script to update a Date UDF

    Hello, I am a bit new to scripting on Sage and would like some assistance if anyone is willing. I am writing a script to update a UDF date field based on any change on the specifications Tab in Item Maintenance. I have attached my script below. I am…
  • Trouble Writing to A UDF on SO Lines from a Button Script

    This script runs from a button on Sales Order DMAIN. The purpose is to update UDF values in SO Detail based on changes made in CI Item. I have tested the script with message boxes (not shown here) to verify that expected keys, line and Item Master values…
  • UDF on JT_WORKTICKET to Work Ticket line on Sales Order

    I have a UDF on JT_WORKTICKET that totals a UDF field for each item on the Parts tab of the Work Ticket. I would like to have that data populate a UDF on the Parent Item in the associated Sales Order. Screen shots attached. I can't find a means…
  • Set freight amount

    Hi all, First script first post. Task is simple for one customer set freight amount field to negotiated amount that is based on the sales order total amount. Script is attached to pre-total event and it always works BUT only if sales order has more…
  • PO Detail History SetKeyValue not working

    Not sure how to word this, but I'm trying to pull some values from PO_PurchaseOrderHistoryInqDetail_bus. The script runs with no errors (button script), but no data is returned. I have a working script that pulls from SO_SalesOrderHistoryInquiryDetail_bus…
  • Add new line SO Detail : can't set Vendor Number

    I've got a button script on Sales Order Entry that a user can enter an Invoice number and a line number, and the script will copy that line to the Sales Order. Everything is working great, except I can't seem to get "VendorNo" to set. I'm getting the…
  • Purchase Order Lines Script not behaving as expected

    We have a checkbox UDF in purchase order entry at the lines level called UDF_LINE_COMPLETED, when they check this box I would like to zero out the quantitybackordered field. I have tried this script as a column pre-validate and post-validiate on the UDF…
  • GetEditKey for Lines is not returning a value on a new order only

    Sage 100 Standard 2015 I have this script in Sales Order. We have a custom panel with some Header UDF's and when the user selects a line, it copies the LineKey into a header UDF to be retrieved by this script to update the Line with new UDF values.…
  • Automatically Save Changes on Event Script

    Without going in to the whole story we are trying to update some fields for auditing purposes and don't want the user to have the option to not save the changes to the order thus not having a record of the auditing information we are looking for. I have…
  • Trying to update Sales Order Header UDF from Invoice Entry getting error

    I'm trying to update a user defined field in the Sales Order Header table using a script from Sales Order Invoice entry from the Table - PreWrite event. The script saves the USERCODE from the session object into a UDF in the Invoice and then tries writing…
  • I am trying to populate a UDF with the Gross Margin by line.

    I have created a script, and it does not seem to work. Do I put it under column validation, or some other mode. Here is the script. Retval=0 rExtcost rExtamount=0 rQtyship=0 rUnitcost=0 rLineGM=0 Set oLines = oBusObj.AsObject(oBusObj.Lines) oLines…