Scriptor
I have added a scriptor component to the Total Pipeline. This code is an offshot out of the book Developing with MS CS 2002. What I basically need to get is the Ship To State so I can determine a tax value etc.
CS 2007 seems to have a problem on the line:
Shipments = orderform.[shipments]
The Event Views states: "Wrong Numbr of Arguments or invalid Property Assignment"
'The following entry points are available (shown in VBScript format):
function MSCSExecute(config, orderform, context, flags)
Dim State
Dim Shipments
Dim TaxTotal
Shipments = orderform.[shipments]
For each Shipment in Shipments
shippingAddressId = shipment.[shipping_address_id]
shippingAddress = orderform.[Addresses].Value(shippingAddressId)
State = shippingAddress.[region_code]
next
TaxTotal = 0
'Put Logic Here
orderform.[_cy_tax_total] = TaxTotal
MSCSExecute = 1
end function
sub MSCSOpen(config)
end sub
sub MSCSClose()
end sub

