| 
 '**************************************************************
 ' Name:         EvaluateRules
 ' Purpose:      Runs SQL procedure sysdba.usp_WF_EvaluateRules which evaluates workflow rules for a given Opportunity.
 ' Assumptions:
 ' Effects:      Eavluates rules for Workflow Transition form.
 ' Inputs:       The OpportunityID
 '               The Phase No (from the screen) should be an integer, but we'll convert it here as well.
 ' Returns:     -1 unsuccessful progress to the end of the procedure, 1 if procedure completes.
 ' Dev Notes:
 '**************************************************************
 Function EvaluateRules (OID)
 Dim objC, objParam
 Dim lngRetVal, strOutputParam
 EvaluateRules    = -1
 'set up command object
 set objC = createObject("ADODB.Command")
 objC.activeconnection =  Application.GlobalInfo.SLX_Native_Conn_String
 ' 07/08/2010 RJS add SQL time out value to the command object:
 objC.CommandTimeout = 300
 objC.CommandType    = 4
 objC.CommandText    = "sysdba.usp_WF_EvaluateRules"
 
 'set up parameter object
 set objParam        = createObject("ADODB.Parameter")
 objParam.Type       = adChar
 objParam.Size       = 12
 objParam.direction  = adParamInput
 objParam.value      = OID
 
 'add param to command, and execute
 objC.Parameters.Append objParam
 objC.Execute()
 EvaluateRules    = 1
 End Function
 
 
 |