| ryanr@nni.com 2004-05-04, 1:37 pm |
| Hmm, I thought the context was passed in automatically...how can I
pass it in then?
-Ryan
Pipeline Error: Component Execution failed for component[0x3] hr:
0x80020101
ProgID: Commerce.Scriptor.1
MscsExecute() failed.
Script invocation failed.
Object required: 'context.dataFunctions'
Line: 7.
>
>
>
>Function mscsexecute(config, orderform, context, flags)
> Dim dataFunctions
> Dim msgBody
>
> Set dataFunctions = context.DataFunctions
>
> orderform.[_email_subject] = "Order Confirmation #: " & _
> orderform.[order_id]
> msgBody = "Thank you for your order." & chr(10) & chr(13) & _
> "Order id: " & orderform.[order_id] & chr(10) & chr(13) & _
> "Order Date: " & dataFunctions.Date(orderform.[date_changed]) & _
> chr(10) & chr(13) & _
> "Order Total: " & _
> dataFunctions.Money(CLng(orderform.[_cy_total_total])) & _
> chr(10) & chr(13) & chr(10) & chr(13)
>
> Dim shipments
> shipments = orderform.[shipments]
>
> msgBody = msgBody & "Shipping Addresses" & chr(10) & chr(13)
> for each shipment in shipments
> shippingAddressId = shipment.[shipping_address_id]
> shippingAddress = orderform.[Addresses].Value(shippingAddressId)
> msgBody = msgBody & "Ship by: " & orderform.[shipping method] & _
> chr(10) & chr(13)
> msgBody = msgBody & shippingAddress.[address_name] & chr(10) & chr(13) & _
> shippingAddress.[address_line1] & chr(10) & chr(13)
> If Len(shippingAddress.[address2]) > 0 Then _
> msgBody = msgBody & shippingAddress.[address2_line2] & chr(10) & chr(13)
>
> msgBody = msgBody & shippingAddress.[city] & ", " & _
> shippingAddress.[region_code] & " " & shippingAddress[postal_code] & _
> chr(10) & chr(13) & chr(10) & chr(13)
> next
>
> orderform.[_email_body] = msgBody
> mscsexecute = 1
>
>End Function
|