0 Replies Latest reply on Nov 21, 2014 8:55 AM by Kirk_1

    IWP Stops

    Kirk_1

      Title

      IWP Stops

      Post

      My script runs on the client just fine. When i run it on IWP it crashes.

      I've included a number of set fields to find out where the script crashes...

      It is at the script steps that are disabled. With it (the transit time) disabled, the script runs on IWP.

      Can anyone see why its crashing?

       

             
      • Set Variable [ $massAssign; Value: Let ( [ $params = Get ( ScriptParameter ) ; $min1 = GetValue ( $params ; 1 ) ; $min2 = GetValue ( $params ; 2 ) ; $min3 = GetValue ( $params ; 3 ) ; $min4 = GetValue ( $params ; 4 ) ; $lessthanfivehundredlbs = GetValue ( $params ; 5 ) ; $fivehundredlbs = GetValue ( $params ; 6 ) ; $onethousandlbs = GetValue ( $params ; 7 ) ; $twothousandlbs = GetValue ( $params ; 8 ) ; $fivethousandlbs = GetValue ( $params ; 9 ) ; $tenthousandlbs = GetValue ( $params ; 10 ) ; $cfwgtgp = GetValue ( $params ; 11 ) ; $cl500 = GetValue ( $params ; 12 ) ; $cl400 = GetValue ( $params ; 13 ) ; $cl350 = GetValue ( $params ; 14 ) ; $cl300 = GetValue ( $params ; 15 ) ; $cl250 = GetValue ( $params ; 16 ) ; $cl225 = GetValue ( $params ; 17 ) ; $cl200 = GetValue ( $params ; 18 ) ; $cl175 = GetValue ( $params ; 19 ) ; $cl150 = GetValue ( $params ; 20 ) ; $cl125 = GetValue ( $params ; 21 ) ; $cl110 = GetValue ( $params ; 22 ) ; $cl100 = GetValue ( $params ; 23 ) ; $cl92.5 = GetValue ( $params ; 24 ) ; $cl85 = GetValue ( $params ; 25 ) ; $cl77.5 = GetValue ( $params ; 26 ) ; $cl70 = GetValue ( $params ; 27 ) ; $cl65 = GetValue ( $params ; 28 ) ; $cl60 = GetValue ( $params ; 29 ) ; $cl55 = GetValue ( $params ; 30 ) ; $cl50 = GetValue ( $params ; 31 ) ; $adjustRateBasisNum = GetValue ( $params ; 32 ) ; $ozip = GetValue ( $params ; 33 ) ; $dzip = GetValue ( $params ; 34 ) ; $fak1 = GetValue ( $params ; 35) ; $weight1 = GetAsNumber ( GetValue ( $params ; 36 ) ) ; $scaleNumber = GetValue ( $params ; 37 ) ; $shipstate = GetValue ( $params ; 38); $constate = GetValue ( $params ; 39) ; $custid = GetValue ( $params ; 40 ) ; $fsc = GetValue ( $params ; 41 ) ; $discount_pct = GetValue ( $params ; 42 ) ; $discount_min = GetValue ( $params ; 43 ) ; $carrier = GetValue ( $params ; 44 ); $pronumber = GetValue ( $params; 45 ) ; $MarsMin = GetValue ( $params; 46 ) ; $AdjustedClassMultiplier = GetValue ( $params ; 47) ; $Marsmagicnumber = GetValue ($params ; 48 ); $AdjustedWeightMultiplier = GetValue ($params ; 49 ) ; $MarsMagicNumberDW = GetValue ($params; 50) ; $marsminDW = GetValue ($params; 51) ; $weight2 = GetValue ($params; 52) ; $weight3 = GetValue ($params; 53) ; $weight1 = GetValue ($params;54) ; $fak2 = GetValue ($params;55); $fak3 = GetValue ($params;56) ; $Marsmagicnumberw2 = GetValue ($params;57) ; $Marsmagicnumberw3 = GetValue ($params;58) ; $Marsmagicnumberdw2 = GetValue ($params;59) ; $Marsmagicnumberdw3 = GetValue ($params;60); $Marsmagicnumberw1 = GetValue ($params;61) ; $Marsmagicnumberdw1 = GetValue ($params;62); $Carrierid = GetValue ($params;63) ; $CustomerMultiplier = GetValue ($params;64) ; $RateBase = GetValue ($params;65) ; $BeginMars = GetValue ($params;66) ] ; "" ) ]
      •      
      • # Begin transit time
      •      
      • // Set Variable [ $carrierAlpha; Value:Case ( $carrier = "FEDEX PRIORITY" ; "FXFE"; $carrier = "FEDEX ECONOMY"; "FXFE"; $carrier = "YRC" ; "RDWY"; $carrier = "ESTES EXPRESS LINES" ; "EXLA" ; $carrier = "CONWAY" ; "CNWY"; $carrier = "USF REDDAWAY" ; "RETL" ; $carrier = "SAIA MOTOR FREIGHT" ; "SAIA" ; $carrier = "OLD DOMINION FREIGHT LINES" ; "ODFL" ; $carrier = "AAA COOPER" ; "AAAC" ) ]
      •      
      • // Go to Layout [ “Transit Time Zip” (Transit Time Zip) ]
      •      
      • // Show All Records
      •      
      • // Go to Record/Request/Page [ First ]
      •      
      • // Set Field [ Transit Time Zip::notes; "begin transit time" ]
      •      
      • // # Does not set this field
      •      
      • // Enter Find Mode [ ]
      •      
      • // Set Field [ Transit Time Zip::TTZ_CarrierAlphaCode; $carrierAlpha ]
      •      
      • // Set Field [ Transit Time Zip::TTZ_LowZipCode; "≤" & $OZip ]
      •      
      • // Set Field [ Transit Time Zip::TTZ_HighZipCode; " ≥ " & $OZip ]
      •      
      • // Perform Find [ ]
      •      
      • // If [ not Get ( FoundCount ) or Get ( LastError ) ]
      •      
      • // Enter Find Mode [ ]
      •      
      • // Set Field [ Transit Time Zip::TTZ_LowZipCode; " ≥ " & $OZip ]
      •      
      • // Set Field [ Transit Time Zip::TTZ_HighZipCode; " ≤ " & $OZip ]
      •      
      • // Perform Find [ ]
      •      
      • // End If
      •      
      • // If [ $CarrierAlpha = "EXLA" ]
      •      
      • // Set Variable [ $OutBoundDays; Value:Transit Time Zip::TTZ_IDInbound ]
      •      
      • // Set Variable [ $OutBoundDirect; Value:Transit Time Zip::TTZ_IDOutbound ]
      •      
      • // Set Variable [ $OutBoundTerminal; Value:Transit Time Zip::TTZ_TermnialCode ]
      •      
      • // Else
      •      
      • // Set Variable [ $OutBoundDirect; Value:Transit Time Zip::TTZ_IDOutbound ]
      •      
      • // Set Variable [ $OutBoundDays; Value:Transit Time Zip::TTZ_DaysOutbound ]
      •      
      • // Set Variable [ $OutBoundTerminal; Value:Transit Time Zip::TTZ_TermnialCode ]
      •      
      • // End If
      •      
      • // Enter Find Mode [ ]
      •      
      • // Set Field [ Transit Time Zip::TTZ_CarrierAlphaCode; $carrierAlpha ]
      •      
      • // Set Field [ Transit Time Zip::TTZ_LowZipCode; " ≤ " & $DZip ]
      •      
      • // Set Field [ Transit Time Zip::TTZ_HighZipCode; " ≥ " & $DZip ]
      •      
      • // Perform Find [ ]
      •      
      • // If [ not Get ( FoundCount ) or Get ( LastError ) ]
      •      
      • // Enter Find Mode [ ]
      •      
      • // Set Field [ Transit Time Zip::TTZ_LowZipCode; " ≥ " & $DZip ]
      •      
      • // Set Field [ Transit Time Zip::TTZ_HighZipCode; " ≤ " & $DZip ]
      •      
      • // Perform Find [ ]
      •      
      • // End If
      •      
      • // Set Variable [ $InBoundDirect; Value:Transit Time Zip::TTZ_IDInbound ]
      •      
      • // Set Variable [ $InBoundDays; Value:Transit Time Zip::TTZ_DaysInbound ]
      •      
      • // Set Variable [ $InBoundTerminal; Value:Transit Time Zip::TTZ_TermnialCode ]
      •      
      • // Go to Layout [ “Transit Time Terminal Days” (Transit Time Terminal Days) ]
      •      
      • // Show All Records
      •      
      • // Go to Record/Request/Page [ First ]
      •      
      • // Set Field [ Transit Time Terminal Days::notes; "transit tiem" ]
      •      
      • // Enter Find Mode [ ]
      •      
      • // Set Field [ Transit Time Terminal Days::TTD_CarrierAlphaCode; $carrierAlpha ]
      •      
      • // Set Field [ Transit Time Terminal Days::TTD_OriginTerminal; $OutBoundTerminal ]
      •      
      • // Set Field [ Transit Time Terminal Days::TTD_DestinationTerminal; $InBoundTerminal ]
      •      
      • // Perform Find [ ]
      •      
      • // Set Variable [ $TransitDays; Value:Transit Time Terminal Days::TTD_TransitDays ]
      •      
      • // Set Variable [ $TotalDays; Value:Case ( $carrierAlpha = ""; 0; $carrier = "FEDEX ECONOMY"; $OutBoundDays + $InBoundDays + $TransitDays +1; not IsEmpty ($carrierAlpha ); $OutBoundDays + $InBoundDays + $TransitDays ) ]
      •      
      • // # End transit time
      •      
      • Go to Layout [ “Rate Calculation” (Rate Calculation) ]
      •      
      • Go to Record/Request/Page [ First ]
      •      
      • Set Field [ Rate Calculation::notes; "begin rate calc @ rate Calc layout" ]
      •      
      • New Record/Request
      •      
      • Set Field [ Rate Calculation::Base_Rate_1; $min1 ]
      •      
      • Set Field [ Rate Calculation::Base_Rate_2; $min2 ]
      •      
      • Set Field [ Rate Calculation::Base_Rate_3; $min3 ]
      •      
      • Set Field [ Rate Calculation::Base_Rate_4; $min4 ]
      •      
      • Set Field [ Rate Calculation::Base_Rate_L500; $lessthanfivehundredlbs ]
      •      
      • Set Field [ Rate Calculation::Base_Rate_500; $fivehundredlbs ]
      •      
      • Set Field [ Rate Calculation::Base_Rate_1000; $onethousandlbs ]
      •      
      • Set Field [ Rate Calculation::Base_Rate_2000; $twothousandlbs ]
      •      
      • Set Field [ Rate Calculation::Base_Rate_5000; $fivethousandlbs ]