Posts

Who are the A-Team? (Components of Artificial Intelligence explained to a 9 year old)

In simple terms, here are the elements (with jargons) that creates what we know today as AI (Generative): 1. The Giant Library (The Data) What it is: The first step is the Training Data. This is like every single book, article, story, website, and conversation the AI has ever read—which is a huge amount of the internet! Job: This data is the food for the AI brain. It teaches the AI how humans talk, what things mean, and how sentences are put together. Jargon: Data: Just a fancy word for information. Training Data: The specific information the computer uses to learn. 2. The Super Student (The Model) What it is: The main structure of the AI, like a very organized school in the computer. It’s called a Large Language Model (LLM). Job: This student doesn't just memorize the data; it finds patterns. It learns that after the words "Once upon a," the next word is probably "time." After reading billions of examples, it gets really, really good at guessing the most likely...

SuiteScript : Track Original Transaction (the Copied From)

Image
Script Difficulty: 💚 💚 💚 Ok, so have you ever wonder if a transaction is copied or created from scratch?  And if it is copied from another transaction, well, where did it come from originally? In this exercise we have a client script that tracks your records as the users process the transaction in such a behavior.  The user start out by opening an existing record then clicking "Make Copy". The script kick off a series of validation checks and grabs its original transaction and dump it in a customer field (Type record).  The administrator (or power user) can later run a report base on this field for audits. If the transaction is not copied (meaning it is created from scratch) then the custom field will left blank.  In essence, if you see a non-blanks in this tracking custom field, you know it is a copy. The solution does a one pass check (it will only check as far back as one copied at a time).  If  the record has already make multiple copied passes, you ...

Troubleshoot : Purchase Order did not Auto Generate for Drop Shipping

Image
Issue: You have created a Sales Order that includes one or more Drop Ship item (item record that has the checkbox Drop Ship enabled) > Save. You expectation is that NetSuite will automatically generate the Purchase Order on the dropship items for you.  This is standard NetSuite drop ship behavior. What actually happened is it didn't, you still have to manually Drop Ship it from the CREATE PO sub list column. You don't have custom script or workflow running on sales orders. Resolution: CHECK your item setup for Purchase Price. CHECK your item setup for Preferred Vendor. CHECK your item setup for Subsidiary of Preferred Vendor matching your Subsidiary of Sales Order. CHECK your sales order is Approved. If the standard behavior is not working, it is most likely due to the item setup.  Focus on item setup and go from there.

SuiteScript : Defaulting Tax Code at Line Level

Image
Script Difficulty: 💚 Here is a time where you would like to set the tax code at the line level to select a certain tax.  This is an alternative solution to demonstrate that you can consider scripting to implement at the line level.  The solution also combined with a control point visible to the user for triggering of the script actions. Exercise goal: for all Invoices, have a custom checkbox that controls the triggering of setting tax code to NoTax to every line and override the tax to zero at save. Create a new custom checkbox and give it a good name, in our case it's Wipe Tax.  Set the checkbox's internal ID to custbody_wipetax .  Customization > Scripting > Scripts > New Script Under Script File field, upload the JavaScript  > Create Script Record > User Event Give it a good name. Under Script tab, set BEFORE SUBMIT FUNCTION to userEventBeforeSubmit . Under Deployments tab, apply the script to Invoice.  Give a good deploy name, set Deploy...

Saved Search Build : Find And Replace Substrings

Image
Build Difficulty: 💗💗💗💗 The time has come that you need to find certain string in the column and replace it with a hard-coded ones.  Additionally, we are combining this search & replace with a nested comparison logic. Exercise goal: look at the Posting Period and replace with the first of the month instead of of the abbreviations in the results.  For example, transform from "Feb 2022" to "2-1-2022". TRANSACTION search CRITERIA Posting = T RESULTS Document Number Formula Text = "CASE WHEN REGEXP_SUBSTR({postingperiod},'\A\w\w\w\s')='Jan ' THEN REGEXP_REPLACE({postingperiod},'\A\w\w\w\s','1-1-') WHEN REGEXP_SUBSTR({postingperiod},'\A\w\w\w\s')='Feb ' THEN REGEXP_REPLACE({postingperiod},'\A\w\w\w\s','2-1-') WHEN REGEXP_SUBSTR({postingperiod},'\A\w\w\w\s')='Mar ' THEN REGEXP_REPLACE({postingperiod},'\A\w\w\w\s','3-1-') WHEN REGEXP_SUBSTR({postingperiod},'\A\w\...