Formula ingredients example
This example demonstrates how to add a formula ingredient.
Option Strict Off
Imports System
Imports System.Data
Imports System.Diagnostics
Class ActionScript
Inherits FcProcFuncSetEventWF
Function wf_start() As Long
Dim ds As DataSet = ObjectDataSet("", "")
Dim IngrTableName As String = DataSetTableName("", "", "INGR")
Dim IngrTable As DataTable = ds.Tables(IngrTableName)
Dim newIngrRow As DataRow = GetNewRow("", "", "INGR")
newIngrRow("ITEM_CODE") = "01001"
newIngrRow("QUANTITY") = 15.5
newIngrRow("UOM_CODE") = "LB"
RowUpdate("", "", "INGR", newIngrRow)
CommitNewRow("", "", "INGR", newIngrRow)
Return 111
End Function
End Class