Click or drag to resize

IScriptingEventsOnCurrentSaleStatusChanged Method

Called when the sale is about to be saved, and the open/sold/lost status has changed value since the object was loaded.

Namespace:  SuperOffice.COM.ScriptEvents
Assembly:  Scripting.Interop (in Scripting.Interop.dll) Version: 8.0.0.0
Syntax
void OnCurrentSaleStatusChanged(
	int oldValue,
	int newValue
)

Parameters

oldValue
Type: SystemInt32
newValue
Type: SystemInt32
Examples

Description

This text may be copied to the notepad, and saved as a *.vbs file.

VB
sub OnCurrentSaleStatusChanged
' add a follow up
    set soApnt = database.createappointment
    soApnt.SetDefaults
    soApnt.contact = currentcontact
          soApnt.task = database.GetListItemByName(67, "Sale followup")
          soApnt.DoBy = DateAdd("d", 1, Now())
          soApnt.Description = "A sale status was changed yesterday, do you need to follow it up today?"
          soApnt.Save
end sub

See Also