VM Macros

OnSave

OnAfterSave

BeforeSave

OnNew

OnLoad

*Macro names are case sensitive*

Part Maintenance example:

'Make sure part is top level before running the rest of the macro

If ENGINEERING_MSTR <> "" Then

' Fill in Warehouse and Location if Primary Warehouse is blank

If PRIMARY_WHS_ID = "" Then

PRIMARY_WHS_ID = "MAIN"

PRIMARY_LOC_ID = "SHIP"

Else

End If

' Fill in Warehouse and Location if Auto Issue Warehouse is blank

If BACKFLUSH_WHS_ID = "" Then

BACKFLUSH_WHS_ID = "MAIN"

BACKFLUSH_LOC_ID = "SHIP"

Else

End If

' Change Order Policy to Discrete if Fabricated and Not Planned

If FABRICATED = "True" And ORDER_POLICY = "Not planned" Then

ORDER_POLICY = "Discrete"

Else

End If

' Change Lead Time to 30 days if Fabricated and Lead Time = 0

IF FABRICATED = "True" And PLANNING_LEADTIME = 0 Then

PLANNING_LEADTIME = 30

Else

End If

End If